It’s my first time asking a question on this site. (yes, I know, my english is bad)
I’m doing an online christmas card that send the link to the card via mail. My issue is when I tried to sent it to my business mail(@businessname.com), it do not receive the mail at all in outlook, but it work fine when I send it to my gmail or my hotmail.
After looking around, it might be a problem with the spam filter of the company mailing system
$to = $case4;
$subject = 'Christmas card from ' . $case1;
$url = "http://mysite.com/folder/index.php?action=see&id=" . $id;
$message = 'Hi ' . $case3 . ',<br />Your friend ' . $case1 . ' sent you this card!<br /><a href="' . $url . '" target="_blank">Click here to see it</a>';
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-Type: text/html; charset=ISO-8859-1" . "\r\n";
mail($to, $subject, $message, $headers);
Anyone know how I can solve my problem?
Thanks
The
mailcommand will invoke the localsendmailprogram to send mail. This results in the webhost sending mail. Spamfilters not only look at the mail’s content but certainly also at origin and headers. Try using an SMTP solution from a renowned mail sending service (if you have Gmail, you can use their SMTP servers), for example by utilising theMailpackage from PEAR.In addition, use
Mail_Mimeto correctly create MIME encoded messages.