Not able to send the mails from javamail through exchange server
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mohan_Raj
Posted On:   Monday, May 20, 2002 08:35 AM

Hi I wrote the code to send mails there is no error but the mails are not going.Mails are going from outlook but not from the program written by me.Any configuration we have to to at smtp server(exchangeserver) only intranet. The code is as follows: properties props = new properties(); props.put("mail.host","sdg_backoffice"); //sdg_backoffice is the system name of the exchange server Session session = session.getdefaultinstance(props,null); Message msg = new MimeMessage(session); Address mailfrom = internetaddress("mohan@sdg.co.in") Address mailto = internetaddress("mohan@sdg.co.in") msg.setFrom(mailfrom); msg.setRecipients( Me   More>>

Hi
I wrote the code to send mails there is no error but the mails are not going.Mails are going from outlook but not from the program written by me.Any configuration we have to to at smtp server(exchangeserver) only intranet.
The code is as follows:
properties props = new properties();
props.put("mail.host","sdg_backoffice"); //sdg_backoffice is the system name of the exchange server

Session session = session.getdefaultinstance(props,null);
Message msg = new MimeMessage(session);
Address mailfrom = internetaddress("mohan@sdg.co.in")
Address mailto = internetaddress("mohan@sdg.co.in")
msg.setFrom(mailfrom);

msg.setRecipients(
Message.RecipientType.TO,mailto);
msg.setSubject("test");
msg.setContent("Testing the mails from javamail","text/html");
Transport.send(msg);

I am not getting any error but mails are not going........same code is running........if it is mailserver........But it is not working in exchageserver...in intranet.

Please help me in this.Wht should be there at exchange server.

   <<Less
About | Sitemap | Contact