forked from PHPMailer/PHPMailer
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
40 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -348,14 +348,17 @@ class PHPMailer | |
* * `error_log` Output to error log as configured in php.ini | ||
* By default PHPMailer will use `echo` if run from a `cli` or `cli-server` SAPI, `html` otherwise. | ||
* Alternatively, you can provide a callable expecting two params: a message string and the debug level: | ||
* <code> | ||
* | ||
* ```php | ||
* $mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; | ||
* </code> | ||
* ``` | ||
* | ||
* Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug` | ||
* level output is used: | ||
* <code> | ||
* | ||
* ```php | ||
* $mail->Debugoutput = new myPsr3Logger; | ||
* </code> | ||
* ``` | ||
* | ||
* @see SMTP::$Debugoutput | ||
* | ||
|
@@ -434,7 +437,7 @@ class PHPMailer | |
* | ||
* @example 'example.com' | ||
* | ||
* @var string | ||
* @var string | ||
*/ | ||
public $DKIM_domain = ''; | ||
|
||
|
@@ -737,11 +740,11 @@ public function __destruct() | |
* claims to be sendmail), don't pass params (not a perfect fix, | ||
* but it will do). | ||
* | ||
* @param string $to To | ||
* @param string $subject Subject | ||
* @param string $body Message Body | ||
* @param string $header Additional Header(s) | ||
* @param ?string $params Params | ||
* @param string $to To | ||
* @param string $subject Subject | ||
* @param string $body Message Body | ||
* @param string $header Additional Header(s) | ||
* @param string|null $params Params | ||
* | ||
* @return bool | ||
*/ | ||
|
@@ -1161,11 +1164,13 @@ public function getLastMessageID() | |
* * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. | ||
* * `noregex` Don't use a regex: super fast, really dumb. | ||
* Alternatively you may pass in a callable to inject your own validator, for example: | ||
* <code> | ||
* | ||
* ```php | ||
* PHPMailer::validateAddress('[email protected]', function($address) { | ||
* return (strpos($address, '@') !== false); | ||
* }); | ||
* </code> | ||
* ``` | ||
* | ||
* You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator. | ||
* | ||
* @param string $address The email address to check | ||
|
@@ -3599,8 +3604,8 @@ public function isError() | |
* $name value can be overloaded to contain | ||
* both header name and value (name:value). | ||
* | ||
* @param string $name Custom header name | ||
* @param ?string $value Header value | ||
* @param string $name Custom header name | ||
* @param string|null $value Header value | ||
*/ | ||
public function addCustomHeader($name, $value = null) | ||
{ | ||
|
@@ -3636,7 +3641,7 @@ public function getCustomHeaders() | |
* @param string $message HTML message string | ||
* @param string $basedir Absolute path to a base directory to prepend to relative paths to images | ||
* @param bool|callable $advanced Whether to use the internal HTML to text converter | ||
* or your own custom converter @see PHPMailer::html2text(). | ||
* or your own custom converter @see PHPMailer::html2text() | ||
* | ||
* @return string $message The transformed message Body | ||
*/ | ||
|
@@ -3730,19 +3735,20 @@ public function msgHTML($message, $basedir = '', $advanced = false) | |
* Note - older versions of this function used a bundled advanced converter | ||
* which was removed for license reasons in #232. | ||
* Example usage: | ||
* <code> | ||
* | ||
* ```php | ||
* // Use default conversion | ||
* $plain = $mail->html2text($html); | ||
* // Use your own custom converter | ||
* $plain = $mail->html2text($html, function($html) { | ||
* $converter = new MyHtml2text($html); | ||
* return $converter->get_text(); | ||
* }); | ||
* </code> | ||
* ``` | ||
* | ||
* @param string $html The HTML text to convert | ||
* @param bool|callable $advanced Any boolean value to use the internal converter, | ||
* or provide your own callable for custom conversion. | ||
* or provide your own callable for custom conversion | ||
* | ||
* @return string | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
* PHP Version 5.5. | ||
* | ||
* @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project | ||
* | ||
* @author Marcus Bointon (Synchro/coolbru) <[email protected]> | ||
* @author Jim Jagielski (jimjag) <[email protected]> | ||
* @author Andy Prevost (codeworxtech) <[email protected]> | ||
|
@@ -101,14 +102,17 @@ class SMTP | |
* * `html` Output escaped, line breaks converted to `<br>`, appropriate for browser output | ||
* * `error_log` Output to error log as configured in php.ini | ||
* Alternatively, you can provide a callable expecting two params: a message string and the debug level: | ||
* <code> | ||
* | ||
* ```php | ||
* $smtp->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; | ||
* </code> | ||
* ``` | ||
* | ||
* Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug` | ||
* level output is used: | ||
* <code> | ||
* | ||
* ```php | ||
* $mail->Debugoutput = new myPsr3Logger; | ||
* </code> | ||
* ``` | ||
* | ||
* @var string|callable|\Psr\Log\LoggerInterface | ||
*/ | ||
|
@@ -144,9 +148,11 @@ class SMTP | |
public $Timelimit = 300; | ||
|
||
/** | ||
* @var array Patterns to extract an SMTP transaction id from reply to a DATA command. | ||
* Patterns to extract an SMTP transaction id from reply to a DATA command. | ||
* The first capture group in each regex will be used as the ID. | ||
* MS ESMTP returns the message ID, which may not be correct for internal tracking. | ||
* | ||
* @var string[] | ||
*/ | ||
protected $smtp_transaction_id_patterns = [ | ||
'exim' => '/[0-9]{3} OK id=(.*)/', | ||
|
@@ -156,8 +162,10 @@ class SMTP | |
]; | ||
|
||
/** | ||
* @var string|bool|null The last transaction ID issued in response to a DATA command, | ||
* if one was detected | ||
* The last transaction ID issued in response to a DATA command, | ||
* if one was detected. | ||
* | ||
* @var string|bool|null | ||
*/ | ||
protected $last_smtp_transaction_id; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters