|
Posted by Geoff Muldoon on 02/08/07 23:14
leon@dontcallmeeeore.co.uk says...
> Im using the mail() command to send an email to people who register on
> my site, but many are ending up in people's spam boxes on hotmail.
>
> This problem isn't true of all users - probably around 60%.
>
> Im being as open as possible using a number of headers, but can anyone
> suggest a way of getting through with less problems ?
>
> $sender = "From: Name <email@domain.com>" . "\n";
> $sender .= "Return-Path: email@domain.com" . "\n";
> $sender .= "MIME-Version: 1.0" . "\n";
> $sender .= "Content-Type: text/plain; charset=iso-8859-1" . "\n";
> $sender .= "Content-Transfer-Encoding: 8bit" . "\n";
> $sender .= "X-Mailer: PHP/" . phpversion();
$param="-f<email@domain.com>";
mail($to, $subject, $body, $headers, $param);
Attempts to set the canonical from address rather than just the header
from address, if the two differ often you get tagged as spam.
Geoff M
Navigation:
[Reply to this message]
|