Php mail content with link -------------------- & lt; ahref & quot; www.baidu.com & quot; & gt; baidu & lt; a & gt; can't be written directly, the code is displayed exactly like this when I send it to the email. can't I click the connection? is there any other way? ------ Solution ------------------ Add link to php mail content
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 $; // I'll "walk" the <B> dog </B> nowecho $ 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.