JavaMail-Exchage Server
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   prashant_kharade
Posted On:   Tuesday, June 19, 2001 02:13 AM

I'm using JavaMail API in my Mailing application with Exchange Server. Sending mail in my domain works but when I try to send a mail outside my domail e.g yahoo I get Undeliverable message from Exchange.But it Works fine when I send it thru Outlook?Is there anything I need to look when I'm sending mail Outside my domain? My code sample is-- String sSmtpHost="192.9.200.4"; string from = "prashant@mydomain.com"; String to=prashant@yahoo.com; Properties props = System.getProperties(); Properties properties = System.getProperties(); props.put("mail.smtp.host", sSmtpHost); Session session = Session.getInstanc   More>>


I'm using JavaMail API in my Mailing application with Exchange Server.
Sending mail in my domain works but when I try to send a mail outside my domail e.g yahoo I get Undeliverable message from Exchange.But it Works fine when I send it thru Outlook?Is there anything I need to look when I'm sending mail Outside my domain?


My code sample is--
String sSmtpHost="192.9.200.4";


string from = "prashant@mydomain.com";

String to=prashant@yahoo.com;
Properties props =
System.getProperties();
Properties properties =
System.getProperties();
props.put("mail.smtp.host", sSmtpHost);
Session session =
Session.getInstance(properties, null);

session.setDebug(true);


MimeMessage message = new MimeMessage(session);

message.setFrom(new
InternetAddress(sFrom));
message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));

message.setSubject(sSubject);

message.setText(sBody);
Transport.send(message);

   <<Less

Re: JavaMail-Exchage Server

Posted By:   Pasi_Kupiainen  
Posted On:   Monday, June 25, 2001 03:49 AM

Your Exchange Server has been set NOT to allow smtp routing without logging in to Exchange.
About | Sitemap | Contact