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

Recommended Answers

All 9 Replies

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

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.

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

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

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 <a href=\"http://192.168.1.21:8080/tarka/resentemail.jsp\"> here</a> 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.

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 <a href=\"http://192.168.1.21:8080/tarka/resentemail.jsp\"> here</a> 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.

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).

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.