aspose file tools*
The moose likes Java in General and the fly likes Including a link while sending a mail Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Including a link while sending a mail" Watch "Including a link while sending a mail" New topic
Author

Including a link while sending a mail

Kanchan Singh
Ranch Hand

Joined: Dec 27, 2007
Posts: 38
Hi All

How do I append a link while creating a mail . So that when the user receives a mail he should be able to click .
Any answer is highly appriciated.

Thanks

Kanchan Singh
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41863
    
  63
Most email clients automatically recognize URLs, and will turn them into clickable links - nothing to do on the sender's part. You can give it a try by sending yourself an URL :-)


Ping & DNS - my free Android networking tools app
Kanchan Singh
Ranch Hand

Joined: Dec 27, 2007
Posts: 38
Hi
Thanks for the reply
I tried sending mail to the receipent . The URL that I am sending goes as plain text .
it displays as

Click here

and not as the only Click here as a link.
Any suggestion why.

Thanks
Kanchan
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41863
    
  63
Not following. What does "Click here" have to do with an URL? Did you insert it in the mail? What did you think it would do?
and not as the only Click here as a link.

I don't understand what you're trying to say here. Can you rephrase it and provide more detail?
Kanchan Singh
Ranch Hand

Joined: Dec 27, 2007
Posts: 38
Hi

When I am creating message part for the mail I have to send a link.
To send a url eg: "www.yahoo.com" I simply inserted this text in the message string "http://www.yahoo.com" but this did not worked it simply printed the text without creating a navigational link. So I tried using < a href="" >.
Event his didnt helped.
This is what I have tried till now.

Regards
Kanchan
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41863
    
  63
Email clients are not browsers, so using HTML doesn't work. I guess it depends on the client; most GUI clients I've seen convert URLs to links just fine.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19695
    
  20

You can use HTML in emails, on two conditions:
1) you specify the content type as being text/html
2) the client supports it

Now most GUI clients support HTML just fine, but people can turn that off (I have, for instance), and there also exist text-based email clients (e.g. pine, mutt) - but those are mostly used on UNIX systems.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Including a link while sending a mail