About java mail
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Muhammad_Usman
Posted On:   Sunday, June 17, 2001 10:06 PM

Hi i have a serious problem .i want to make a project of javamail.i dont know what to use instead of localhost..i mean can i use some mail server??like postmaster or some else..please help how can i implement mail on my local machine......

Re: About java mail

Posted By:   sivaram_ponraj  
Posted On:   Monday, June 18, 2001 09:47 PM

Hello usman,
Actually u should have a mail server to send the email messages to somewhere.The mail server can be of any different machine .The mail server can be of MS exchange server or of any vendors.From u r machine if u want send any mail write code to acess the mail server host or install a mail client and configure it to the mail server.
If u r using java use

Properties props = System.getProperties();
props.put("mail.smtp.host",mailserverhost);
Session session1= Session.getDefaultInstance(props,null);

create a session like this and then acess the mail server
About | Sitemap | Contact