Skip to content

Commit

Permalink
Standardise on CRLF line breaks
Browse files Browse the repository at this point in the history
Better auth mechanism selection
  • Loading branch information
Synchro committed May 23, 2016
1 parent e61b522 commit ec4c2ee
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 124 deletions.
14 changes: 11 additions & 3 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ This is a major update that breaks backwards compatibility.
* The custom autoloader has been removed, now PSR-4 compatible: [**use composer**](https://getcomposer.org)!
* Classes & Exceptions renamed to make use of the namespace
* Most statically called functions now use the `static` keyword instead of `self`, so it's possible to override static internal functions in subclasses, for example `validateAddress()`
* `Extras` classes have been removed - use packages from [packagist.org](https://packagist.org) instead
* Complete RFC standardisation on CRLF (`\r\n`) line breaks by default:
* `PHPMailer:$LE` removed
* `PHPMailer::CRLF` line ending constant renamed to `PHPMailer::LE`, defaults to , used everywhere
* All uses of `PHPMailer::$LE` property converted to use `static:LE` constant for consistency and ease of overriding
* Similar changes to line break handling in SMTP and POP3 classes.
* Extensive reworking of XOAUTH2, adding support for Google, Yahoo and Microsoft providers, thanks to @sherryl4george
* Major cleanup of docs and examples
* All elements previously marked as deprecated have been removed:
* `PHPMailer->Version`
* `PHPMailer->ReturnPath`
Expand All @@ -27,8 +33,10 @@ This is a major update that breaks backwards compatibility.
* `parseAddresses()` is now static
* `validateAddress()` is now called statically from `parseAddresses()`
* `PHPMailer->SingleToArray` is now protected
* Extensive reworking of XOAUTH2, adding support for Google, Yahoo and Microsoft providers, thanks to @sherryl4george
* Major cleanup of docs and examples
* Don't try to use an auth mechanism if it's not supported by the server
* Reorder automatic AUTH mechanism selector to try most secure method first
* `Extras` classes have been removed - use packages from [packagist.org](https://packagist.org) instead
* Better handling of automatic transfer encoding switch in the presence of long lines

## Version 5.2.15 (May 10th 2016)
* Added ability to inject custom address validators, and set the default validator
Expand Down
4 changes: 2 additions & 2 deletions examples/smtp_low_memory.phps
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SMTPLowMemory extends SMTP
}

/* The server is ready to accept data!
* According to rfc821 we should not send more than 1000 characters on a single line (including the CRLF)
* According to rfc821 we should not send more than 1000 characters on a single line (including the LE)
* so we will break the data up into lines by \r and/or \n then if needed we will break each of those into
* smaller lines to fit within the limit.
* We will also look for lines that start with a '.' and prepend an additional '.'.
Expand Down Expand Up @@ -93,7 +93,7 @@ class SMTPLowMemory extends SMTP
if (!empty($line_out) and $line_out[0] == '.') {
$line_out = '.' . $line_out;
}
$this->client_send($line_out . self::CRLF);
$this->client_send($line_out . self::LE);
}
}

Expand Down
Loading

0 comments on commit ec4c2ee

Please sign in to comment.