I wrote a PHP script for sending email. I am using a CMS which is based on PHP MySQL. I am able to send emails, and people can receive the eamils as well, but the problem is they get HTML tags in their email.
As I am writing the mail by using that CMS and for which i have to write some HTML tags there like </br>, <p> etc. The code for sending mail is below. What should I change so that people can get nice email without HTML tags, but formatted HTML mail. Thanks for helping me out.
$sentemail = mail($email_user, $subject, $message,"From: ABC<xyz@.com>\nX-Mailer: PHP/".phpversion());
you have to set the header to send html email, like that:
$headers = 'Content-type: text/html; charset=utf-8' . "\r\n";, and then use the header in mail() function instead the From.. statement. Check documentation for more info http://php.net/manual/en/function.mail.php (example #4)