954,136 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

hyperlink in java mail

hi everyody,i need ur help.I am able to send subject and text as mail to the recepient but iam unable to send hyperlinks in th text.plz suggest me how to send

balagangadharm
Light Poster
26 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

Simply include the url. Whether or not that url becomes a "hyperlink" depends on the tool being used to view the mail.

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

when i send the url ( http://192.168.1.21:8080/tarka/resentemail.jsp ) to gmail,it working fine and showing the link.but wen i send it to yahoomail,link is not shown but simply a plain text.
my code
String text=" Hello welcome,
click here to enjoy http://192.168.1.21:8080/tarka/resentemail.jsp";
message1.setText(text);
Is this the way.plz suggest. I want to send links in between text.hope u help me

balagangadharm
Light Poster
26 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

Then ask yahoo mail if there is any thing special you have to do to get yahoo to create "hyperlinks". I don't know why you're asking here, this is not anywhere even close to a Java issue.

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

ok atleast plz tell this.
Iam unable to send mail rediffmail using javamail.can u plz tell me y

balagangadharm
Light Poster
26 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
 

No, as I have no idea what you mean by "rediffmail".

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

you may have better luck if you send the email as hypertext or have a html attachment.

try just enclosing the url in tags as such

String text=" Hello welcome,
click here to enjoy ";

see how something like that works.

I don't know what class you are using but I would assume that you can send a HTML attachment, That will be displayed correctly in most mail applications and then any links you send will be displayed correctly.

Paul.Esson
Junior Poster
181 posts since Feb 2005
Reputation Points: 21
Solved Threads: 10
 

you may have better luck if you send the email as hypertext or have a html attachment.

try just enclosing the url in tags as such

String text=" Hello welcome, click here to enjoy ";

see how something like that works.

I don't know what class you are using but I would assume that you can send a HTML attachment, That will be displayed correctly in most mail applications and then any links you send will be displayed correctly.

Unless, of course, HTML display is disabled in the Mail tool, which many companies have it disabled by default.

Edit: But, once again, this is still a mail tool problem and has absolutely nothing to do with Java.

masijade
Industrious Poster
Moderator
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
 

you'll need to send the message as html, including the proper mime types for the message content.
JavaMail I think offers that, but I don't know how to activate it (I hate non-text email).

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

You can send it as a Multipart email with plain text and HTML.

you can find instructions from sun here

All you have to do is add both BodyParts, specifying the mime type of both parts.

Paul.Esson
Junior Poster
181 posts since Feb 2005
Reputation Points: 21
Solved Threads: 10
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You