有一个标准说您可以从多个电子邮件地址发送。我的意思是发件人标头可以有多个电子邮件地址。
https://www.rfc-editor.org/rfc/rfc5322#section-3.6.2
我尝试了不同的mail
功能组合,但都没有奏效。
<?php
$to = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com, dat@teddy.com' . "\r\n" .
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>
<?php
$to = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: webmaster@example.com' . "\r\n" . 'From: dat@teddy.com' . "\r\n"
'Reply-To: webmaster@example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
?>