Re: SMTP Server required for sending mail
Posted By:
Ramesh_Sethuraman
Posted On:
Monday, April 22, 2002 10:29 PM
You cannot Use your proxy server as your smtp server. Both are different. SMTP server is your mail server. Give the IP of your mail server and things will work fine.
The Sample code for mail server part is
Properties props = System.getProperties();
// Setup mail server
props.put("mail.smtp.host","12.166.132.11");
// Get session
Session session = Session.getDefaultInstance(props, null);
// Create the message
Message message = new MimeMessage(session);