Hello,
I’m using mail() to send html e-mails but in some servers they e-mail is not sending when using:
$headers .= ‘From: ‘.$from.’ <’.$contact.’>’."\r\n";
I think the problem is ‘<’, ‘>’ because when I just use ‘From: something’ it sends the email but I get “From: [email protected]”…
Here is my header:
$headers = ‘MIME-Version: 1.0’ . “\r\n”;
$headers .= ‘Content-type: text/html; charset=iso-8859-1’ . “\r\n”;
$headers .= ‘From: ‘.$from.’ <’.$contact.’>’."\r\n";
mail($email, $subject, $body, $headers, “-f$contact”);
I’ve tried several things but it only works with “From: $from”…
Am I doing something wrong?
Thanks for your help.
Oh, if it helps, my website is on cheapname hosting…