我正在使用一些代码将数据发送到数据库,该数据库还将确认电子邮件发送到在表单字段中输入的电子邮件地址
出于某种奇怪的原因,它似乎只发送到我的 gmail 帐户,而没有像 hotmail tiscali yahoo 这样的其他东西
这是我用来发送电子邮件的代码
// this send the receiver an email with the link to their ecard
mail("$receiveremail","Somebody loves you !", "<img src=\"http://www.somebodylovesyou.co.uk/images/email-header.jpg\" width=\"300\" height=\"57\">
</p>
<p>Hello $name,</p>
<p>Someone you know has sent you a secret valentine's message from http://www.somebodylovesyou.co.uk </p>
<p>You can view your message here : <a href='http://www.somebodylovesyou.co.uk/viewcard.php?rand=$eid'>http://www.somebodylovesyou.co.uk/viewcard.php?rand=$eid</a></P>
<P>Why not send a special someone a secret valentine's message at http://www.somebodylovesyou.co.uk</p>
<P>Happy Valentines", $headers);
// this send the receiver an email with the link to their ecard
mail("$youremail","View the message you've just sent", "<img src=\"http://www.somebodylovesyou.co.uk/images/email-header.jpg\" width=\"300\" height=\"57\">
</p>
<p>Hello,</p>
<p>Thanks for using Somebody Loves You </p>
<p>You can view the message you sent here : <a href='http://www.somebodylovesyou.co.uk/viewcard.php?rand=$eid'>http://www.somebodylovesyou.co.uk/viewcard.php?rand=$eid</a></P>
<P>Happy Valentine's", $headers);?>
有人建议我也使用这些标题来帮助发送电子邮件,但它似乎不起作用
// these headers are for the purpose of sending the email replay to hotmail and yahoo addresses
$headers = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "From: SOMEBODY LOVES YOU <hello@somebodylovesyou.co.uk>\r\n";
$headers .= "Reply-To: <hello@somebodylovesyou.co.uk>\r\n";
$headers .= "X-Priority: 3\r\n";
$headers .= "X-MSMail-Priority: Normal\r\n";
$headers .= "X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409\r\n";
$headers .= "X-Mailer: Microsoft Outlook Express 6.00.2800.1409";