I would like to suggest a modification of SmptMailer to define "To:" header with undisclosed-recipients: ; content when Bcc was removed and no other recipient headers are sent. I have been just struggling with sendmail SMTP server that does not like it when no "To" header is set (and I need to send only anonymous notifications from my Nette app).
I think adding
if (!$tmp->getHeader('To') && !$tmp->getHeader('Cc')) {
// missing recipient headers make some mailers (e.g., sendmail) nervous, so we set To like MTAs does
$tmp->setHeader('To', 'undisclosed-recipients: ;');
}
right after line 75 (where $tmp->setHeader('Bcc', null); is) in SmptMailer.php should do the trick...
I would like to suggest a modification of
SmptMailerto define "To:" header withundisclosed-recipients: ;content when Bcc was removed and no other recipient headers are sent. I have been just struggling with sendmail SMTP server that does not like it when no "To" header is set (and I need to send only anonymous notifications from my Nette app).I think adding
right after line 75 (where
$tmp->setHeader('Bcc', null);is) inSmptMailer.phpshould do the trick...