<?php
$message = "Line 1\r\nLine 2\r\nLine 3";
$message = wordwrap($message, 70, "\r\n");
$retval=mail('xxx@gmail.com', 'My Subject', $message);
if( $retval == true )
{
echo "Message sent successfully...";
}else {
echo "Message could not be sent...";
}
?>
它向我发送消息,因为无法发送消息。
答案 0 :(得分:-1)
你的问题在这里:$message = wordwrap($message, 70, "\r\n");
您需要添加.=
它与$message = $message . "wordwrap($message, 70, "\r\n")";