Jenz
Jenz

Reputation: 8369

How to Embed HTML code inside email using PHP

I want to include an html meta tag inside an email which we are sending using PHP.

<meta name=\"yyyy\" content=\"uuuuu\" />

I'm expecting the email like:

Hello,

Thank you for subscribing. Please include the below code in <head>

<meta name=\"yyyy\" content=\"uuuuu\" />

Thanks & Regards,

yy

What is the best way to include html code inside email which will work for all email servers like Gmail, Outlook etc.

Thanks in advance.

Upvotes: 0

Views: 51

Answers (1)

Claims
Claims

Reputation: 270

This is the function you need :

$codeValue = htmlspecialchars("<meta name=\"yyyy\" content=\"uuuuu\" />");

This way the code won't be interprated

Upvotes: 1

Related Questions