Hi all,

Context :
I want to send a mail using SimpleMail class.

Problem :

I have set the mail.server in the turbineRessource.properties file
like that : mail.server=mymailserver.com and I tried also like that :
mail.server=smtp.mymailserver.com

I try to send a SimpleMail but I have the next exception :

Exception: javax.mail.SendFailedException: Sending failed;
nested exception is: javax.mail.MessagingException: Could not connect to
SMTP host: localhost, port: 25;

He said me that he can't connect to "localhost" (my computer). However, I
have set mail.server at "mymailserver.com"
(an other machine).

Code :

SimpleEmail myMailMessage = new SimpleEmail();
  GregorianCalendar sendDate = new GregorianCalendar();

  myMailMessage.addTo("[EMAIL PROTECTED]","vchappuis");
  myMailMessage.setMsg("test");
  myMailMessage.setSubject("test");
  myMailMessage.setFrom("[EMAIL PROTECTED]","vchappuis");
  myMailMessage.setSentDate(sendDate.getTime());

  myMailMessage.send();

Do I forgot something else ?

any Idea ?

Regards










------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to