开发者

PHP: how to create a link inside a body of a text email?

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 th开发者_如何学编程at link?

Regards

Javi


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

<?php
echo '<a href="http://yourdomain.com/link.html">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


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.


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜