电子邮件发件人回复地址怎么说“不回复”?

时间:2012-02-01 12:26:32

标签: php email pear yahoo

今天我使用我的雅虎帐户在Pinterest.com注册了自己。注册后,我收到了一封电子邮件验证电子邮件,电子邮件底部显示了雅虎的消息:

  

发件人回复地址表示不回复

我也可以隐藏此消息,我的意思是它不在电子邮件正文中。

以下是我的电子邮件的屏幕截图:http://imgur.com/ke95B

我的问题是:

当我使用'PHP PEAR'或默认mail()函数时,如何使用此选项?

2 个答案:

答案 0 :(得分:4)

雅虎解析回复标题。设置这样的标题:

Reply-To: noreply@example.com

将example.com替换为您的发件人域名。

它应该与mail()(参见Zac的例子)或Pear

一起使用
[....]
$headers["Reply-To"]="noreply@example.com";
$mail_object->send($recipients, $headers, $body); 

no-reply代替noreply也可以。例如,来自pinterest.com的电子邮件有一个标题Reply-To: no-reply@pinterest.com

答案 1 :(得分:1)

使用标准mail()简单示例如下:

$headers = array(
        'From: No reply',
        'Content-Type: text/html'
        );

        $subject = "This is a subject";
        $message = 'Some email message goes in here';

        $to = 'someone@example.com';

        mail($to,$subject,$message,implode("\r\n",$headers));
相关问题