SMTP Server required for sending mail
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Neelakandan_Selvaraj
Posted On:   Monday, April 22, 2002 09:12 PM

SMTP Server required for sending mail
I have the small mail application for sending mail to my client. In this, i am using mail.smtp.host properties as my proxy m/c name. will it work or shall i can configure any other smtp server for sending mail

kind regards
S.Neelakandan.

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);
About | Sitemap | Contact