
Signature
Canadian Mind Products, Roedy Green, http://mindprod.com
Priorities: Prevent global climate destabilisation. End both wars. Prepare for oil shortages.
On Mar 13, 11:34 pm, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> >Need to send mail throgh Java file...i am using Mail.jar and self-
> >created Mailer object that can send text messages.
[quoted text clipped - 6 lines]
> Canadian Mind Products, Roedy Green,http://mindprod.com
> Priorities: Prevent global climate destabilisation. End both wars. Prepare for oil shortages.
See the JavaMail api as suggested earlier,the classes you will be
using are Message, Session etc...
The you have to do the following.
1. Create a Session instance
2. Then get a Message instance on the created session Message message
= new MimeMessage(session);
3. Then set recipient,subject etc like message.setSubject(subject);
4. Then set the content type of message as message.setContent(message
to be sent, "text/html");
5. At last call send() of Transport to finally sent this message
Transport.send(message);
If you want to arrange the text of 'message to be sent' then use HTML
tags which you are creating the text.
chandan