문제

If I set the recipients do I also need to set the TO header?

I am setting the To header like this (From an EE template in an EE plugin):

$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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top