Skip to content

Commit

Permalink
Provide a link to troubleshooting docs on SMTP failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Synchro committed May 4, 2015
1 parent c7e488d commit da70308
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.md
Expand Up @@ -33,6 +33,7 @@
* Expose stream_context_create options via new SMTPOptions property
* Automatic encoding switch to quoted-printable if message lines are too long
* Add Korean translation (Thanks to @ChalkPE)
* Provide a pointer to troubleshooting docs on SMTP connection failure

## Version 5.2.9 (Sept 25th 2014)
* **Important: The autoloader is no longer autoloaded by the PHPMailer class**
Expand Down
6 changes: 6 additions & 0 deletions class.phpmailer.php
Expand Up @@ -2949,6 +2949,12 @@ protected function lang($key)
}

if (array_key_exists($key, $this->language)) {
if ($key == 'smtp_connect_failed') {
//Include a link to troubleshooting docs on SMTP connection failure
//this is by far the biggest cause of support questions
//but it's usually not PHPMailer's fault.
return $this->language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting';
}
return $this->language[$key];
} else {
//Return the key as a fallback
Expand Down

0 comments on commit da70308

Please sign in to comment.