This change modifies the previous patch to explicitly check the length of the string that was read from the stream. The last fread() operation can return an empty string, and passing an empty string to _send() can result in a socket error. We need to use strlen() here instead of just testing ($line) because PHP evaluates strings like "0" as FALSE.
Previously, the stream would be terminated if a line began with a period because fgets() was returning the "\n" at the end of the previous call. Bug: 18563 Patch by: Michael Slusarz
New authentication methods can be added (or existing methods replaced) by calling setAuthMethod($method, $callback). Submitted by: Emmanuel Dreyfus
…ther than its default behavior. We rely on PEAR_ERROR_RETURN internally to detect a number of soft error conditions, so we now request that behavior explicitly where appropriate. Bug: 18469 Suggested by: Peter Gyongyosi
… were successfully written to the socket. Previously, they just returned 'true' on success. All usage of _send() and _put() is private so this change results in no user API changes.
…imeouts. Request: 18197
…ture. Bug: 17942
…sing it as the optional second parameter to ``data()``. This is especially useful when an open file resource is being used to supply message data because it allows header fields (like *Subject:*) to be built dynamically at runtime. Request: #17012
…ines whether or not TLS authentication should be attempted (if supported by the PHP runtime and the remote SMTP server). This parameter defaults to true. Bug: #16349
containing the message data. Request #16962