aspose file tools*
The moose likes Other JSE/JEE APIs and the fly likes Problem in Send mail to MS Outlook with hyperlink body using java Mail API Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Problem in Send mail to MS Outlook with hyperlink body using java Mail API" Watch "Problem in Send mail to MS Outlook with hyperlink body using java Mail API" New topic
Author

Problem in Send mail to MS Outlook with hyperlink body using java Mail API

yousuf alam
Greenhorn

Joined: Apr 22, 2008
Posts: 9
Hi Friends,

I am sending mail to Microsoft outlook using java mail API with hyperlink body and text message body.
I am getting text message in body.but i couldnot able to get hyperlink message.i got hyperlink message in attachement.i attached the screenshot for the reference.
But i want to display the hyperlink in body itself.this is my source code.Kinldy help me on this..this is very urgent

protected Message mesg;
mesg = new MimeMessage(session);
mesg.setFrom(new InternetAddress("test@test.com"));
InternetAddress toAddress = new InternetAddress(message_recip);
mesg.addRecipient(Message.RecipientType.TO, toAddress);
InternetAddress ccAddress = new InternetAddress(message_cc);
mesg.addRecipient(Message.RecipientType.CC, ccAddress);
mesg.setSubject(message_subject);

Multipart mp = new MimeMultipart();
BodyPart textPart = new MimeBodyPart();
textPart.setText(textdata);
BodyPart pixPart = new MimeBodyPart();
pixPart.setContent(html_data, "text/html");

mp.addBodyPart(textPart);
mp.addBodyPart(pixPart);
mesg.setContent(mp);
Transport.send(mesg);



[Thumbnail for mail.png]


yousuf alam.A
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem in Send mail to MS Outlook with hyperlink body using java Mail API