Hi I have an application that sends mail to few addresses in an interval. I have the sample code as below,
Code:
Properties prop = System.getProperties();
prop.setProperty("mail.smtp.host",<SMTP Mail Server Name>);
Session session = Session.getInstance(props);
MimeMessage message = new MimeMessage(session);
message.setFrom(new InternetAddress("[email protected]"));
message.addRecipient(Message.RecipientType.TO,new InternetAddress("[email protected]"));
message.setSubject("test");
message.setText("Test Mail");
Transport.send(message);
With in my LAN there is no problem, here I given IP address of the system that runs a Mailer daemon as mail sever name. I am getting mails in outlook express in my LAN. But when I give Our SMTP server name that is used in for internet (Provieded by a service provider who manage our site), I am not finding any error or exceptions but, I could not find mails in the mail box.
Ajit