if (!$to[$i]->host) $to[$i]->host = $domain;
if (strlen($to[$i]->mailbox)) {
// Ask for DSN if user has requested such and remote server supports it
- if ($rfc822_header->dsn && array_key_exists('DSN',$this->ehlo)) {
+ if (isset($rfc822_header->dsn) && $rfc822_header->dsn
+ && array_key_exists('DSN',$this->ehlo)) {
// TODO: Make the DSN parameters configurable by admin? user?
fputs($stream, 'RCPT TO:<'.$to[$i]->mailbox.'@'.$to[$i]->host."> NOTIFY=SUCCESS,DELAY,FAILURE\r\n");
// Retry without DSN fields for cranky MTAs
if (!$cc[$i]->host) $cc[$i]->host = $domain;
if (strlen($cc[$i]->mailbox)) {
// Ask for DSN if user has requested such and remote server supports it
- if ($rfc822_header->dsn && array_key_exists('DSN',$this->ehlo)) {
+ if (isset($rfc822_header->dsn) && $rfc822_header->dsn
+ && array_key_exists('DSN',$this->ehlo)) {
// TODO: Make the DSN parameters configurable by admin? user?
fputs($stream, 'RCPT TO:<'.$cc[$i]->mailbox.'@'.$cc[$i]->host."> NOTIFY=SUCCESS,DELAY,FAILURE\r\n");
// Retry without DSN fields for cranky MTAs
if (!$bcc[$i]->host) $bcc[$i]->host = $domain;
if (strlen($bcc[$i]->mailbox)) {
// Ask for DSN if user has requested such and remote server supports it
- if ($rfc822_header->dsn && array_key_exists('DSN',$this->ehlo)) {
+ if (isset($rfc822_header->dsn) && $rfc822_header->dsn
+ && array_key_exists('DSN',$this->ehlo)) {
// TODO: Make the DSN parameters configurable by admin? user?
fputs($stream, 'RCPT TO:<'.$bcc[$i]->mailbox.'@'.$bcc[$i]->host."> NOTIFY=SUCCESS,DELAY,FAILURE\r\n");
// Retry without DSN fields for cranky MTAs