Easiest way is to setup a normal email program and see what the error
messages are.
If the machine doesnt have core mailing engines installed, it will probably
tell you.
If you on windows, try Outlook express, detailed messages will probably
point you in right direction.
Code should look something like this
public boolean prepareConnection(String smtpHost){
this.smtpHost = smtpHost;
fSessionInited = true;
try{
java.util.Properties properties = System.getProperties();
properties.put("mail.smtp.host", smtpHost);
session = Session.getInstance(properties,null);
} catch(Exception e) {
fSessionInited = false;
}
return fSessionInited;
}
----- Original Message -----
From: "Mighty Tornado" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Friday, April 06, 2007 7:30 AM
Subject: sending smtp mail failure
Hi,
I set up a small web app and the servlet is supposed to send an email
using
JavaMail. But I am getting exceptions - Connection Timed out every time. I
am using Gmail as an smtp server to bounce emails off. How can I avoid the
Connection Timed out exception? Could it be because of my firewall? If so,
which process should I permission?
Thank you,
MT
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]