views:

34

answers:

4

Hi,

I have a .php that contents the body of a text email.

In that body I want to create a link that when the user receives the email can be clicked.

How to create that link?

Regards

Javi

A: 

if you use Content-type: text/html

its simple insert a tag in the body

simple code to send mail:

http://www.webhostingtalk.com/showthread.php?t=416467

Haim Evgi
A: 

You can simply use a Tag as in HTML and that use that HTML for the content of your mail.

Kau-Boy
+2  A: 

If it is as simple as your question sounds then..

<?php
echo '<a href="http://yourdomain.com/link.html"&gt;Click Here</a>';
?>

The HTML a tag will do them job.

This is assuming that youu are using a HTML based email, if you are using plain text then I would suggest just typing in the URL

Lizard
Note that SMTP does not directly support HTML - so the content needs to be declared as an inline attachment.
symcbean
+1  A: 

If it is a plain-text email, you can't have links. The best you can hope for is to write out the url and hope that the mail-reader will convert it into a link for you.

Hans Kesting
advise that you try viewing an email generated by your app - in various readers to see what they look like. Take the extra step of setting the reader to text only, if that is an option. Some emailers know that HTML rendered in a text only viewer looks horrible and don't care. Do you?
MaasSql
Thanks, but not exactly..could you explain in other way? or could you give me any link?