Skip to content

Commit

Permalink
Merge branch 'release/1.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jazz-Man committed Mar 26, 2020
2 parents 703ff9f + 113a37b commit 42079cf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/WPMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ public function __construct($exceptions = true)
private function setSmtpConfig()
{
if (!\defined('WP_MAIL_SMTP_URL')) {
throw new Exception("'WP_MAIL_SMTP_URL' no defined");

$error_message = "'WP_MAIL_SMTP_URL' no defined";

$this->setError($error_message);
$this->edebug($error_message);

throw new Exception($error_message);
}

$dsn = (object) parse_url(WP_MAIL_SMTP_URL);
Expand All @@ -55,7 +61,7 @@ private function setSmtpConfig()
$this->SMTPSecure = $dsn->scheme;

if (WP_DEBUG && (\defined('WP_MAIL_SMTP_DEBUG') && WP_MAIL_SMTP_DEBUG)) {
$this->Debugoutput = 'echo';
$this->Debugoutput = 'error_log';
$this->SMTPDebug = \defined('WP_MAIL_SMTP_DEBUG_LEVEL') ? WP_MAIL_SMTP_DEBUG_LEVEL : 1;
}
}
Expand Down

0 comments on commit 42079cf

Please sign in to comment.