Pergunta

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?

Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top