Skip to content

Commit

Permalink
Closes PHPMailer#861
Browse files Browse the repository at this point in the history
  • Loading branch information
neo22s committed Oct 20, 2016
1 parent cf8cd05 commit 52faee6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions class.phpmailer.php
Original file line number Diff line number Diff line change
Expand Up @@ -684,16 +684,20 @@ private function mailPassthru($to, $subject, $body, $header, $params)
} else {
$subject = $this->encodeHeader($this->secureHeader($subject));
}

//Can't use additional_parameters in safe_mode
//@link http:https://php.net/manual/en/function.mail.php
if (ini_get('safe_mode') or !$this->UseSendmailOptions) {
$result = @mail($to, $subject, $body, $header);
} else {
}
elseif($params == NULL) {
$result = @mail($to, $subject, $body, $header);
}
else {
$result = @mail($to, $subject, $body, $header, $params);
}
return $result;
}

/**
* Output debugging info via user-defined method.
* Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug).
Expand Down

0 comments on commit 52faee6

Please sign in to comment.