hyperlink in java mail

Reply

Join Date: Oct 2007
Posts: 26
Reputation: balagangadharm is an unknown quantity at this point 
Solved Threads: 0
balagangadharm balagangadharm is offline Offline
Light Poster

hyperlink in java mail

 
0
  #1
Nov 7th, 2007
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
Bala Gangadhar Marripeedi m.balagangadhar@gmail.com
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,639
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 283
Moderator
masijade's Avatar
masijade masijade is offline Offline
Posting Maven

Re: hyperlink in java mail

 
0
  #2
Nov 7th, 2007
Simply include the url. Whether or not that url becomes a "hyperlink" depends on the tool being used to view the mail.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 26
Reputation: balagangadharm is an unknown quantity at this point 
Solved Threads: 0
balagangadharm balagangadharm is offline Offline
Light Poster

Re: hyperlink in java mail

 
0
  #3
Nov 7th, 2007
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
Bala Gangadhar Marripeedi m.balagangadhar@gmail.com
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,639
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 283
Moderator
masijade's Avatar
masijade masijade is offline Offline
Posting Maven

Re: hyperlink in java mail

 
0
  #4
Nov 7th, 2007
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.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 26
Reputation: balagangadharm is an unknown quantity at this point 
Solved Threads: 0
balagangadharm balagangadharm is offline Offline
Light Poster

Re: hyperlink in java mail

 
0
  #5
Nov 7th, 2007
ok atleast plz tell this.
Iam unable to send mail rediffmail using javamail.can u plz tell me y
Bala Gangadhar Marripeedi m.balagangadhar@gmail.com
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,639
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 283
Moderator
masijade's Avatar
masijade masijade is offline Offline
Posting Maven

Re: hyperlink in java mail

 
0
  #6
Nov 7th, 2007
No, as I have no idea what you mean by "rediffmail".
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 181
Reputation: Paul.Esson is an unknown quantity at this point 
Solved Threads: 10
Paul.Esson's Avatar
Paul.Esson Paul.Esson is offline Offline
Junior Poster

Re: hyperlink in java mail

 
0
  #7
Nov 7th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,639
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 283
Moderator
masijade's Avatar
masijade masijade is offline Offline
Posting Maven

Re: hyperlink in java mail

 
0
  #8
Nov 7th, 2007
Originally Posted by Paul.Esson View Post
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.
Last edited by masijade; Nov 7th, 2007 at 6:38 am.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,482
Reputation: jwenting is a name known to all jwenting is a name known to all jwenting is a name known to all jwenting is a name known to all jwenting is a name known to all jwenting is a name known to all 
Solved Threads: 235
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: hyperlink in java mail

 
0
  #9
Nov 7th, 2007
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).
42
Reply With Quote Quick reply to this message  
Join Date: Feb 2005
Posts: 181
Reputation: Paul.Esson is an unknown quantity at this point 
Solved Threads: 10
Paul.Esson's Avatar
Paul.Esson Paul.Esson is offline Offline
Junior Poster

Re: hyperlink in java mail

 
0
  #10
Nov 7th, 2007
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 3324 | Replies: 9
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC