简体   繁体   English

PEAR-> Mail.php收件人和标题

[英]PEAR->Mail.php recipients and To Header

If I set the recipients do I also need to set the TO header? 如果设置了收件人,是否还需要设置TO标头?

I am setting the To header like this (From an EE template in an EE plugin): 我正在这样设置To标头(从EE插件中的EE模板):

$headers["To"]      = $this->EE->TMPL->fetch_param('send_to');

and then the recipient like this: 然后像这样的收件人:

$recipients         = $this->EE->TMPL->fetch_param('send_to');

Then sending like this: 然后像这样发送:

$mail_object        =& Mail::factory("smtp", $smtpinfo);
$mail_result        = $mail_object->send($recipients, $headers, $email_msg);

Do I really need to do both of them? 我真的需要同时做两个吗?

It will reach the recipients. 它将到达收件人。 However if you leave the key 'To' in the header blank it will show "undisclosed-recipients" for the reader in their mail client. 但是,如果将标题“ To”保留为空白,则阅读器在其邮件客户端中将显示“ unisclosed-收件人”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM