How To Turn On the IIS SMTP Server?
I have the IIS SMTP server installed in my PC. While testing to send e-mails using the JavaMail, I can see that messages do not reach the server.
I have never used the IIS SMTP server before. I think the problem is that the server is not running (I could be wrong). How do I turn on the IIS SMTP server?
My IIS SMTP is running because
1. I typed http://xp-jenc-c/ in the browser and I am connected to the Windows XP Professional (http://xp-jenc-c/localstart.asp) and it says that 'Your web service is now running.'
2. On my desktop screen, I click on the IIS. And then expand the XP-JENC-C (local computer) node. Right-click on the Default SMTP Virtual Server. I can see 'Start' is grayed out. Only Stop and Pause are the available choices.
However, messages cannot reach the server. It is hanging after I submit the mail message. Here is the code of the msgsend. java:
import java.io.*;
import java.net.InetAddress;
import java.util.Properties;
import java.util.Date;
import javax.mail.*;
import javax.mail.internet.*;
* Demo app that shows how to construct and send an RFC822
* (singlepart) message.
* XXX - allow more than one recipient on the command line
* @author Max Spivak
* @author Bill Shannon
public class msgsend {
public static void main(String[] argv) {
new msgsend(argv);
public msgsend(String[] argv) {
String to, subject = null, from = null,
cc = null, bcc = null, url = null;
String mailhost = null;
String mailer = "msgsend";
String protocol = null, host = null, user = null, password = null;
String record = null; // name of folder in which to record mail
boolean debug = false;
BufferedReader in =
new BufferedReader(new InputStreamReader(System.in));
int optind;
for (optind = 0; optind < argv.length; optind++) {
if (argv[optind].equals("-T")) {
protocol = argv[++optind];
} else if (argv[optind].equals("-H")) {
host = argv[++optind];
} else if (argv[optind].equals("-U")) {
user = argv[++optind];
} else if (argv[optind].equals("-P")) {
password = argv[++optind];
} else if (argv[optind].equals("-M")) {
mailhost = argv[++optind];
} else if (argv[optind].equals("-f")) {
record = argv[++optind];
} else if (argv[optind].equals("-s")) {
subject = argv[++optind];
} else if (argv[optind].equals("-o")) { // originator
from = argv[++optind];
} else if (argv[optind].equals("-c")) {
cc = argv[++optind];
} else if (argv[optind].equals("-b")) {
bcc = argv[++optind];
} else if (argv[optind].equals("-L")) {
url = argv[++optind];
} else if (argv[optind].equals("-d")) {
debug = true;
} else if (argv[optind].equals("--")) {
optind++;
break;
} else if (argv[optind].startsWith("-")) {
System.out.println(
"Usage: msgsend [[-L store-url] | [-T prot] [-H host] [-U user] [-P passwd]]");
System.out.println(
"\t[-s subject] [-o from-address] [-c cc-addresses] [-b bcc-addresses]");
System.out.println(
"\t[-f record-mailbox] [-M transport-host] [-d] [address]");
System.exit(1);
} else {
break;
try {
if (optind < argv.length) {
// XXX - concatenate all remaining arguments
to = argv[optind];
System.out.println("To: " + to);
} else {
System.out.print("To: ");
System.out.flush();
to = in.readLine();
if (subject == null) {
System.out.print("Subject: ");
System.out.flush();
subject = in.readLine();
} else {
System.out.println("Subject: " + subject);
Properties props = System.getProperties();
// XXX - could use Session.getTransport() and Transport.connect()
// XXX - assume we're using SMTP
if (mailhost != null)
props.put("mail.smtp.host", mailhost);
// Get a Session object
Session session = Session.getInstance(props, null);
if (debug)
session.setDebug(true);
// construct the message
Message msg = new MimeMessage(session);
if (from != null)
msg.setFrom(new InternetAddress(from));
else
msg.setFrom();
msg.setRecipients(Message.RecipientType.TO,
InternetAddress.parse(to, false));
if (cc != null)
msg.setRecipients(Message.RecipientType.CC,
InternetAddress.parse(cc, false));
if (bcc != null)
msg.setRecipients(Message.RecipientType.BCC,
InternetAddress.parse(bcc, false));
msg.setSubject(subject);
collect(in, msg);
msg.setHeader("X-Mailer", mailer);
msg.setSentDate(new Date());
// send the thing off
Transport.send(msg);
System.out.println("\nMail was sent successfully.");
// Keep a copy, if requested.
if (record != null) {
// Get a Store object
Store store = null;
if (url != null) {
URLName urln = new URLName(url);
store = session.getStore(urln);
store.connect();
} else {
if (protocol != null)
store = session.getStore(protocol);
else
store = session.getStore();
// Connect
if (host != null || user != null || password != null)
store.connect(host, user, password);
else
store.connect();
// Get record Folder. Create if it does not exist.
Folder folder = store.getFolder(record);
if (folder == null) {
System.err.println("Can't get record folder.");
System.exit(1);
if (!folder.exists())
folder.create(Folder.HOLDS_MESSAGES);
Message[] msgs = new Message[1];
msgs[0] = msg;
folder.appendMessages(msgs);
System.out.println("Mail was recorded successfully.");
} catch (Exception e) {
e.printStackTrace();
public void collect(BufferedReader in, Message msg)
throws MessagingException, IOException {
String line;
StringBuffer sb = new StringBuffer();
while ((line = in.readLine()) != null) {
sb.append(line);
sb.append("\n");
// If the desired charset is known, you can use
// setText(text, charset)
msg.setText(sb.toString());
Similar Messages
-
How do I change the primary SMTP server address on my iPhone DOT-MAC accoun
My original account smtp settings were for dot-mac. I am having ever increasing problems getting mail to send. I can find the settings for my primary SMTP server, but cannot edit or update them (currently smtp.mac.com), as they are all gray'd out and cannot be changed. I would like to update these settings to smpt.me.com. Is it necessary for me to delete this account in order to update the settings? That seems rather lame.
What did not work? You could not add an additional SMTP server? It does not matter what the primary is listed as....turn it off. Then turn on the additional server you added.
Better yet remove your .mac account and add it back as .me account.
.Mac to MobileMe transition FAQ
http://support.apple.com/kb/HT1932
Message was edited by: iphone3Gguy -
Hello everybody!
Could anybody suggest how I must fix the outgoing mail server-SMTP problem, when it indicates to be offline?
I tried everythind and still couldn't manage to turn it on.
Thank you!Hopefully I solved it....
-
I love my apple email and do not want to use google mail on safari. However, I have 2 gmail accounts set up on apple mail, but when I send mail from one of my gmail accounts (I choose the specific gmail account in the drop down window), it actually goes out as if it is from the other gmail account. I can't have that happen because one is my job, the other is a personal business account and unfortunately, the mail from both gmail accounts want to send through the personal business account. How do I make it send from a specific gmail account? I even tried deleting the accounts and setting them up again hoping I set it up wrong in the first place, but to no avail, it is still doing the same thing except this time I set the job account up first and then the personal business account and now everything goes from the job account! The only good thing is that the incoming messages work properly and they go into the correct inbox. Somebody please fix my outbox!
In Mail Preferences/Accounts/each GMail account, set up the SMTP Outgoing Server for each account separately, going into SMTP name/edit/Advanced and specify the Username of each account. The Outgoing servers must be two different servers, authenticated by the Username and Password of each.
Otherwise, the GMail SMTP server will change the from address to that of the account where the SMTP server was setup.
Ernie -
HT4519 how do i get an additional SMTP server host?
how do i get an additional SMTP server host?
Can we start again.. My site is now online, I couldn't wait any longer because I need it for my buisness so I got rid of the code that wasn't working.
But I still need a rollover text to appear so..
1) I go into the code snippets and add a mouse over event
2) In my actionscript I add your text: yourtextfield.text = "whatever text you want to show";
So do I make an empty text field first, give it a name and replace "yourtextfield" with the name?
Or do I replace "whatever text you want to show" with my text and thats just it?
Or both?
Or am I way off? -
In my ipad mini sound is there but somehow display turned off....please help...how to turn on the display
Frozen or unresponsive iPad
Resolve these most common issues:
• Display remains black or blank
• Touch screen not responding
• Application unexpectedly closes or freezes
http://www.apple.com/support/ipad/assistant/ipad/
iPad Frozen, not responding, how to fix
http://appletoolbox.com/2012/07/ipad-frozen-not-responding-how-to-fix/
iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
Black or Blank Screen on iPad or iPhone
http://appletoolbox.com/2012/10/black-or-blank-screen-on-ipad-or-iphone/
What to Do When Your iPad Won't Turn On
http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
iOS: Not responding or does not turn on
http://support.apple.com/kb/TS3281
Home button not working or unresponsive, fix
http://appletoolbox.com/2013/04/home-button-not-working-or-unresponsive-fix/
Fixing an iPad Home Button
http://tinyurl.com/om6rd6u
iPad: Basic troubleshooting
http://support.apple.com/kb/TS3274
Cheers, Tom -
I have tried to set my email to reply from my iphone 5 both of which use the same SMTP server. I can't change the settings on the others as it will only allow one mail account. Can I add multiple with the same smtp?
I Am not using gmail I use seperate company for my mails both use the same smtp server. The problem is when I set my first account it them uses these details and passwords when I create the second account saying that the smtp server is already in use by the primary account. I therefor can't set the password.
-
Does anybody know how to turn off the pics of your Game Center friends that show while you're playing a game?
Swamava,
Thank you for the link you provided and I am glad I am not the only one with this problem, however beforeI install Adblock is it a free program or is there a fee you
must pay to download the program? I am some what hesitant to be oblighted to
a monthly or yearly bill.
i -
Several Mail Accounts with the same smtp server
Let’s assume, you have several accounts but however, you need to login to the same smtp server with different credentials (once with [email protected] and once with [email protected] – authentication on smtp servers is used to prevent spam): This works smooth on every mailbin on your apple/pc.
Try to import your settings with itunes to iphone and everything crashes. Iphone is unable to distinguish accounts on imported smtp servers – you can’t set individual passwords this way.
Work around: Create the accounts manually on iphone.Ameya,
Have a look at your existing DAD configuration, it should be fairly obvious what you need to do to point at another instance. -
How do i Install the Software Update Server for Windows 7?
How do i Install the Software Update Server for Windows 7? I get an error saying: Can't Install the Software because it is not currently available from the Software Update server.
I downloaded the software so How do I install it?
Do I install it all over again or when I have windows open?
I am using Bootcamp.Back up your system drive completely. If you have no backup plan in place, now would be a good time to start. You can use CarbonCopyCloner to make a complete, bootable backup of your system on another drive or volume. After you have done this: download the combo update using the link supplied by Niel and run the installer.
-
Does anyone know how to turn off the pop-up iCloud log-in window on iPhone 5c. I have no desire to use iCloud. I have turned off iCloud in settings but that does not seem to deter the pesky little pop-up from continually asking me to log-in
ThanksPop up usually meant that icloud activation lock is still on on Apple servers. In order to deactivate you need to turn icloud back on by signing in and then sign out properly. For your sake I hope that you know the password.
-
How i turn off the cinema display?
How i turn off the cinema display?
Unfortunately there is no on off switch.
The best you can do is sleep the display or
unplug it.
I don’t know what unplugging it will do/cause.
You can try it.
Thanks ... Ken -
MiniDisplay to HDMI : How to turn off the Dual Monitor output when..
miniDisplay to HDMI : How to turn off the Dual Monitor output when the adapter is attached and the TV is off ? And will keeping the adapter connected even if it is not in use, cause damage to the adapter ?
I have my external monitor/tv setup of the left. If I leave the adapter attached with the TV off, I am still able to cross the border/boundry of my MBP screen ! As instead of detecting a TV, the MBP is detecting the adapter as a screen. I do not want to damage my thunderbolt/miniDisplay port by plugging and unpluggin the unit each and every time.
-
TS3988 how to turn off the passcode after phone is located
how to turn off the pass code after you have found your phone with i cloud
Enter the passcode on it to unlock it, then you can turn off the passcode lock in Settings>General>Passcode Lock.
-
How to connect to the Crystal Reports Server XI R2 installed in other machi
Hi,
we are 3 people here we have Crystal Reports Server XI R2 installed in one machine and Crystal Repoprts XI DEsigner ( downloaded trial version) in all the machines ,
in my machine only Crystal Repoprts XI DEsigner ( downloaded trial version) is installed , how to connect to the Crystal Reports Server XI R2 which is installed in other machine
Regards,
kathyainiHi,
thankyou for your response,
my problem here is as soon as i open CR Designer , and if i click on either New Report,Blank Report, or standard report wizard it is saying "failed to create database connection"
on which ever thing i click it is telling the same "failed to create database connection" i created the user DSN properly , i could not create System DSN i dont know why.
can u please guide me
and one more thing on the machine where CR server is installed , on the same machine designer is also installed (i think u was telling the same) . my question is how the server will know about the CR Designer installed in my machine.
Regards,
kathyaini
Maybe you are looking for
-
Error while updating data from DataStore object
Hi, Currently we are upgrading BW3.5 to BI7.0 for technical only, we found and errors during process chain run in further processing step. This step is basically a delta loading from DSO to Cube. The error message are: Error while updating data from
-
Hi there, I got a new laptop with windows vista three months ago and ever since I loaded itunes on it whenever i'm using the application it doesnt cease to pop up. Whenever it is minimized it will stay in the task bar sometimes only momentarily and s
-
Customer exits for varibles in BeX selection screen
Dear All, I have two fields in BeX variable screen - 'Emp_id' and 'Dep_id'. The entry for 'Emp_id' is mandatory. But at the same time, if someone does not enter values for it, it should ask for 'Dep_id' atleast. If both are blank, then no execution.
-
Weblogic 11G error = BEA-000449 Closing socket as no data read from it
In My Weblogic 11G, i am getting Warning msg in my log file saying Closing socket as no data read from it ####<Nov 2, 2010 12:10:53 AM IST> <Warning> <Socket> <TradeServer> <TradeServer> <[ACTIVE] ExecuteThread: '8' for queue: 'weblogic.kernel.Defaul
-
Trackpad+keyboard not responding after installing drivers from Leopard DVD
I've just installed the Windows XP (SP2) drivers from my Mac OS X DVD (10.5.2), just sitting and watching as it progressed. When the final notice appears, saying that I am to press "finish" to exit the setup, I discover that the trackpad is unrespons