我已经通过php发送了一封邮件。在我的浏览器中显示效果很好。但在我的Gmail中显示不好。我附上我的邮件图片请帮帮我。
function mail($to,$msgbody,$subject,$msgby,$content)
{
$from = 'dass@world360.in';
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= $content." charset=iso-8859-1" . "\r\n";
$headers .= "From: ".$from."\r\n";
$headers .= "Reply-To: ".$msgby."\r\n";
$returnPath = "-r".$from;
if(mail($to, $subject, $msgbody, $headers, $returnPath))
{
return 1;
}
else
{
return 0;
}
}
答案 0 :(得分:2)
'中间的空间'可能是因为在这个单词的中间有一个换行符。由于href
属性中的换行符,该链接无法正常工作。如果你摆脱了所有随机换行符,你的html可能会有用。
我只是想我添加它以防其他人遇到同样的问题:在与OP讨论之后,他发现大多数邮件服务器每行都有990个字符的限制。如果您没有正确格式化代码并且行极长,则服务器可以在该990字符限制处插入换行符。在没有看到原始邮件正文的情况下,我不知道这是OP的问题,但它很有可能。 请参阅:workaround for the 990 character limitation for email mailservers