Вопрос

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