I created a script that sends an email automatically! My mail message is included in the following variable
$message
But when I include html code like or something else, it does not display correctly in my mail!
You can do something like:
$headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $subject = "Subject here"; $message = "email message here"; $sendMail = mail(" info@domain.com ", "$subject", "$message", "$headers" );
If you use a mail command, make sure that you Set the correct headers, for example
$ = headings "From: $ from \ r \ n"; $ Headers = "Content-Type :. Text / html \ g \
mail ($ k, $ question, $ message, $ headers);