我有这个 PHP 脚本可以向自己发送电子邮件。
<?php
try {
$to = "myself@gmail.com";
$subject = "Test Mail";
$message = $_GET['mail'];
$from = "someoneelse@gmail.com";
$headers = "From:" . $from;
mail($to,$subject,$message,$headers);
echo "Mail Sent.";
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
?>
如您所见,消息是从 url 中获取的:/uploadscript.php?mail=test Message\r\nTest message 2
但是电子邮件是
Test MessageTest message 2
是否有可能让它真正分裂它,所以它是
Test Message
Test Message 2