Hello friends
I am trying to send mail from my application
Here is the code
Properties properties = System.getProperties ();
properties.put ("mail.smtp.host","smtp host name");
Session session = Session.getDefaultInstance
(properties,null);
Message message = new MimeMessage (session);
try
{
message.setFrom (new InternetAddress
("[EMAIL PROTECTED]"));
message.setRecipient (Message.RecipientType.TO,new
InternetAddress ("[EMAIL PROTECTED]"));
message.setSubject ("Hi ");
message.setText ("How is it going ?");
message.setSentDate (new Date ());
Transport.send (message);
System.out.println ("Message sent !!!");
}
catch (MessagingException e)
{
e.printStackTrace ();
}
But this code is giving me exception
javax.mail.MessagingException: Could not connect to SMTP host:
usncex10.ad.diebold.com, port: 25
is there any additional setting's required for this one
plse let me know
Sp