Php mail content and link solution

Source: Internet
Author: User
Php mail content with link -------------------- & lt; ahref = & quot; www.baidu.com & quot; & gt; baidu & lt;/a & gt; it cannot be written directly. the code is displayed exactly like this when you send the code to the email. Is there any other way to click the connection ?, No! You add php mail content and link
Link to php mail content
----------------------
The baidu cannot be directly written, and the code is displayed exactly like this when it is sent to the email. you cannot click to connect.

I wonder if there is any other way?

------ Solution --------------------
No! Add a header ("Content-Type: text/html"). add this setting to your message to parse it! The specific addition method may depend on your actual situation.
------ Solution --------------------
Use
Phpmailer library sends emails
------ Solution --------------------
Convert the link to an html tag code and put it into the email. the link will be parsed after reading the link. For example:
PHP code
$ Orig = "I'll \" walk \"DogNow "; $ a = htmlentities ($ orig); $ B = html_entity_decode ($ a); echo $ a; // I'll" walk"DogNowecho $ B; // I'll "walk"DogNow
------ Solution --------------------
The email format can be specified. if it is a pure character, the html part will be displayed as you said.
However, you can specify that the email is in html format.
The vast majority of smtp servers and php mail scripts support specified html-format mail content.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.