summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryehuda <yehuda@myinbox.in>2019-05-16 12:12:33 +0300
committeryehuda <yehuda@myinbox.in>2019-05-16 12:12:33 +0300
commit09ad01149ef5981407149bc3c9502058482fb419 (patch)
tree3ac2513ad5cb08650b03f55d837cf6b1d578dd21
parent9e2de08e9df8ce719fa04da2405d64f633d94b0e (diff)
downloadPost-SMTP-09ad01149ef5981407149bc3c9502058482fb419.zip
Fix default method
The default method was trying to use SMTP, I think it's wrong and i'm changing it to default Sendmail
-rw-r--r--Postman/Postman-Mail/PostmanModuleTransport.php5
-rw-r--r--Postman/Postman-Mail/PostmanZendMailEngine.php4
-rw-r--r--Postman/Postman-Mail/Zend-1.12.10/Mail.php7
-rw-r--r--Postman/Postman-Mail/sendgrid/vendor/sendgrid/php-http-client/CHANGELOG.md130
-rw-r--r--postman-smtp.php4
-rw-r--r--readme.txt4
6 files changed, 15 insertions, 139 deletions
diff --git a/Postman/Postman-Mail/PostmanModuleTransport.php b/Postman/Postman-Mail/PostmanModuleTransport.php
index 1dcc8b0..37d692d 100644
--- a/Postman/Postman-Mail/PostmanModuleTransport.php
+++ b/Postman/Postman-Mail/PostmanModuleTransport.php
@@ -503,6 +503,11 @@ abstract class PostmanAbstractZendModuleTransport extends PostmanAbstractModuleT
$deliveryDetails ['transport_name'] = $this->getTransportDescription ( $this->getSecurityType () );
$deliveryDetails ['host'] = $this->getHostname () . ':' . $this->getPort ();
$deliveryDetails ['auth_desc'] = $this->getAuthenticationDescription ( $this->getAuthenticationType () );
+
+ if ( $deliveryDetails ['host'] == 'localhost:25' ) {
+ $deliveryDetails ['transport_name'] = __( 'Sendmail (server defualt - not SMTP)', 'post-smtp');
+ }
+
/* translators: where (1) is the transport type, (2) is the host, and (3) is the Authentication Type (e.g. Postman will send mail via smtp.gmail.com:465 using OAuth 2.0 authentication.) */
return sprintf ( __ ( 'Postman will send mail via %1$s to %2$s using %3$s authentication.', 'post-smtp' ), '<b>' . $deliveryDetails ['transport_name'] . '</b>', '<b>' . $deliveryDetails ['host'] . '</b>', '<b>' . $deliveryDetails ['auth_desc'] . '</b>' );
}
diff --git a/Postman/Postman-Mail/PostmanZendMailEngine.php b/Postman/Postman-Mail/PostmanZendMailEngine.php
index e4ea286..86905f8 100644
--- a/Postman/Postman-Mail/PostmanZendMailEngine.php
+++ b/Postman/Postman-Mail/PostmanZendMailEngine.php
@@ -171,10 +171,12 @@ if ( ! class_exists( 'PostmanZendMailEngine' ) ) {
$this->logger->debug( 'Create the Zend_Mail transport' );
$zendTransport = $this->transport->createZendMailTransport( $this->transport->getHostname(), array() );
+ $transport = $this->transport instanceof PostmanDefaultModuleTransport ? null : $zendTransport;
+
try {
// send the message
$this->logger->debug( 'Sending mail' );
- $mail->send( $zendTransport );
+ $mail->send( $transport );
if ( $this->logger->isInfo() ) {
$this->logger->info( sprintf( 'Message %d accepted for delivery', PostmanState::getInstance()->getSuccessfulDeliveries() + 1 ) );
}
diff --git a/Postman/Postman-Mail/Zend-1.12.10/Mail.php b/Postman/Postman-Mail/Zend-1.12.10/Mail.php
index d597ea7..67ba4b9 100644
--- a/Postman/Postman-Mail/Zend-1.12.10/Mail.php
+++ b/Postman/Postman-Mail/Zend-1.12.10/Mail.php
@@ -1175,10 +1175,9 @@ class Postman_Zend_Mail extends Postman_Zend_Mime_Message
{
if ($transport === null) {
if (! self::$_defaultTransport instanceof Postman_Zend_Mail_Transport_Abstract) {
- require_once 'Zend/Mail/Transport/Sendmail.php';
-
- $replyTo = self::getDefaultReplyTo();
- $transport = new Postman_Zend_Mail_Transport_Sendmail("-f{$replyTo['email']}");
+ require_once 'Mail/Transport/Sendmail.php';
+
+ $transport = new Postman_Zend_Mail_Transport_Sendmail("-f{$this->_from}");
} else {
$transport = self::$_defaultTransport;
}
diff --git a/Postman/Postman-Mail/sendgrid/vendor/sendgrid/php-http-client/CHANGELOG.md b/Postman/Postman-Mail/sendgrid/vendor/sendgrid/php-http-client/CHANGELOG.md
deleted file mode 100644
index dd0c13d..0000000
--- a/Postman/Postman-Mail/sendgrid/vendor/sendgrid/php-http-client/CHANGELOG.md
+++ /dev/null
@@ -1,130 +0,0 @@
-# Change Log
-All notable changes to this project will be documented in this file.
-
-This project adheres to [Semantic Versioning](http://semver.org/).
-
-## [3.9.6] - 2018-04-10
-### Added
-- PR [#98](https://github.com/sendgrid/php-http-client/pull/98). Updated documention of `Client.php` using PHPDoc.
-- Thanks to [Martijn Melchers](https://github.com/martijnmelchers) for the pull request!
-
-## [3.9.5] - 2018-03-26
-### Added
-- Fixes [#94](https://github.com/sendgrid/php-http-client/issues/94), PR [#95](https://github.com/sendgrid/php-http-client/pull/95): CreateCurlOptions method regression tests
-- Thanks to [Alexandr Ivanov](https://github.com/misantron) for the pull request!
-
-## [3.9.4] - 2018-03-22
-### Fixed
-- Fixes [#586](https://github.com/sendgrid/sendgrid-php/issues/586), PR [#96](https://github.com/sendgrid/php-http-client/pull/96): Fix constructor function signature regression.
-
-## [3.9.3] - 2018-03-11
-### Fixed
-- Fixes [#584](https://github.com/sendgrid/sendgrid-php/issues/584), PR [#93](https://github.com/sendgrid/php-http-client/pull/93): Don't overwrite headers set from upstream dependencies.
-
-## [3.9.2] - 2018-03-10
-### Fixed
-- Fixes [#12](https://github.com/sendgrid/php-http-client/issues/12), PR [#91](https://github.com/sendgrid/php-http-client/pull/91): Curl Options broken as array merge does not preserve keys.
-
-## [3.9.1] - 2018-03-09
-### Fixed
-- Fixes [#88](https://github.com/sendgrid/php-http-client/issues/88), PR [#89](https://github.com/sendgrid/php-http-client/pull/89): Restore missing function 'prepareResponse' due to bad previous merge.
-
-## [3.9.0] - 2018-03-08
-### Added
-- PR [#24](https://github.com/sendgrid/php-http-client/pull/24): implements sending concurrent requests with curl multi, thanks to [Tuan Nguyen](https://github.com/lightbringer1991) for the PR!
-- PR [#25](https://github.com/sendgrid/php-http-client/pull/25): Add description how install php-http-client manually, thanks to [Ivan](https://github.com/janczer) for the PR!
-- PR [#28](https://github.com/sendgrid/php-http-client/pull/28): Create code of conduct, thanks to [Alexander Androsyuk](https://github.com/alex2sat) for the PR!
-- Closes [#32](https://github.com/sendgrid/php-http-client/issues/32), PR [#33](https://github.com/sendgrid/php-http-client/pull/33): Added TROUBLESHOOTING + Debug Info, thanks to [Braunson Yager](https://github.com/Braunson) for the PR!
-- Closes [#35](https://github.com/sendgrid/php-http-client/issues/35), PR [#37](https://github.com/sendgrid/php-http-client/pull/37): Update README badges, thanks to [Tim Harshman](https://github.com/goteamtim) for the PR!
-- Closes [#34](https://github.com/sendgrid/php-http-client/issues/34), PR [#38](https://github.com/sendgrid/php-http-client/pull/38): Update .md files with hyphen vs underscore for page links to enhance SEO, thanks to [Eric Kates](https://github.com/positronek) for the PR!
-- Closes [#39](https://github.com/sendgrid/php-http-client/issues/39), PR [#40](https://github.com/sendgrid/php-http-client/pull/40): Added Packagist badge to README, thanks to [Rakshan Shetty](https://github.com/rakshans1) for the PR!
-- PR [#41](https://github.com/sendgrid/php-http-client/pull/41): Add table of contents in README.md, thanks to [thepriefy](https://github.com/thepriefy) for the PR!
-- PR [#42](https://github.com/sendgrid/php-http-client/pull/42): Add SendGrid logo at the top of README.md, thanks to [thepriefy](https://github.com/thepriefy) for the PR!
-- PR [#43](https://github.com/sendgrid/php-http-client/pull/43): Add License section to the README.md, thanks to [thepriefy](https://github.com/thepriefy) for the PR!
-- Closes [#46](https://github.com/sendgrid/php-http-client/issues/46), PR [#47](https://github.com/sendgrid/php-http-client/pull/47): Create Pull Request Template, thanks to [Paweł Lewtak](https://github.com/pawel-lewtak) for the PR!
-- Closes [#48](https://github.com/sendgrid/php-http-client/issues/48), PR [#51](https://github.com/sendgrid/php-http-client/pull/51): Added example file, updated .gitignore and README, thanks to [Diego Rocha](https://github.com/dhsrocha) for the PR!
-- PR [#53](https://github.com/sendgrid/php-http-client/pull/53): README and usage example update, thanks to [Alexandr Ivanov](https://github.com/misantron) for the PR!
-- PR [#55](https://github.com/sendgrid/php-http-client/pull/55): Code climate config, thanks to [Alexandr Ivanov](https://github.com/misantron) for the PR!
-- Closes [#58](https://github.com/sendgrid/php-http-client/pull/58), PR [#60](https://github.com/sendgrid/php-http-client/pull/60): Adds unit test for checking file existence in repo, thanks to [Michele Orselli](https://github.com/micheleorselli) for the PR!
-- Closes [#57](https://github.com/sendgrid/php-http-client/pull/57), PR [#61](https://github.com/sendgrid/php-http-client/pull/61): Adds unit test for checking year on licence, thanks to [Michele Orselli](https://github.com/micheleorselli) for the PR!
-- Closes [#50](https://github.com/sendgrid/php-http-client/issues/50), PR [#62](https://github.com/sendgrid/php-http-client/pull/62): Create USAGE.md, thanks to [Nitanshu](https://github.com/nvzard) for the PR!
-- Closes [#57](https://github.com/sendgrid/php-http-client/issues/57), PR [#66](https://github.com/sendgrid/php-http-client/pull/66): Add unit test for license year, thanks to [Alex](https://github.com/pushkyn) for the PR!
-- Closes [#67](https://github.com/sendgrid/php-http-client/issues/67), PR [#68](https://github.com/sendgrid/php-http-client/pull/68): Add CodeCov support to .travis.yml, thanks to [Manjiri Tapaswi](https://github.com/mptap) for the PR!
-- Closes [#49](https://github.com/sendgrid/php-http-client/issues/49), PR [#73](https://github.com/sendgrid/php-http-client/pull/73): Create Dockerfile, thanks to [Jessica Mauerhan](https://github.com/jmauerhan) for the PR!
-- Closes [#76](https://github.com/sendgrid/php-http-client/issues/76), PR [#78](https://github.com/sendgrid/php-http-client/pull/78): Added Pull Requests Review section to CONTRIBUTE.md Closes, thanks to [Povilas Balzaravičius](https://github.com/Pawka) for the PR!
-- Closes [#63](https://github.com/sendgrid/php-http-client/issues/63), PR [#79](https://github.com/sendgrid/php-http-client/pull/79): Refactor makeRequest method, thanks to [Michael Dennis](https://github.com/michaeljdennis) for the PR!
-- PR [#82](https://github.com/sendgrid/php-http-client/pull/82): Add JsonSerializable type to phpDoc of $body parameter in makeRequest method, thanks to [Jan Konáš](https://github.com/jankonas) for the PR!
-- PR [#85](https://github.com/sendgrid/php-http-client/pull/85): Updated the PHP Version details, thanks to [Siddhant Sharma](https://github.com/ssiddhantsharma) for the PR!
-- PR [#86](https://github.com/sendgrid/php-http-client/pull/86): Add phpdoc for send method, thanks to [Vitaliy Ryaboy](https://github.com/rvitaliy) for the PR!
-- PR [#84](https://github.com/sendgrid/php-http-client/pull/84): Update Docker instructions
-
-
-### Fixed
-- PR [#26](https://github.com/sendgrid/php-http-client/pull/26): README typo, thanks to [Cícero Pablo](https://github.com/ciceropablo) for the PR!
-- PR [#30](https://github.com/sendgrid/php-http-client/pull/30), Fixes [#18](https://github.com/sendgrid/php-http-client/issues/18): Disable CURLOPT_FAILONERROR, thanks to [Zsolt Prontvai](https://github.com/ProZsolt) for the PR!
-- PR [#44](https://github.com/sendgrid/php-http-client/pull/44): Fix Typo and add missing links to README, thanks to [Alex](https://github.com/pushkyn) for the PR!
-- PR [#52](https://github.com/sendgrid/php-http-client/pull/52): Fix syntax errors in README examples, thanks to [Michael Spiss](https://github.com/michaelspiss) for the PR!
-- Fixes [#56](https://github.com/sendgrid/php-http-client/pull/56), PR [#59](https://github.com/sendgrid/php-http-client/pull/59): Update LICENSE - fix year, thanks to [Alex](https://github.com/pushkyn) for the PR!
-- PR [#69](https://github.com/sendgrid/php-http-client/pull/69): Remove extra parenthesis from README, thanks to [Jessica Mauerhan](https://github.com/jmauerhan) for the PR!
-- PR [#71](https://github.com/sendgrid/php-http-client/pull/71): Fix typo in CONTRIBUTING.md, thanks to [thepriefy](https://github.com/thepriefy) for the PR!
-- Fixes [#81](https://github.com/sendgrid/php-http-client/issues/81), PR [#87](https://github.com/sendgrid/php-http-client/pull/87): Stop using insecure option by default
-
-## [3.8.0] - 2017-09-13
-### Added
-- Pull request #23: [Automatically retry when rate limit is reached](https://github.com/sendgrid/php-http-client/pull/23)
-- Thanks to [Budi Chandra](https://github.com/budirec) for the pull request!
-
-## [3.7.0] - 2017-05-04
-### Added
-- Pull request #19: [Added ability to get headers as associative array](https://github.com/sendgrid/php-http-client/pull/19)
-- Solves issue #361: [https://github.com/sendgrid/sendgrid-php/issues/361](https://github.com/sendgrid/sendgrid-php/issues/361)
-- Thanks to [Alexander](https://github.com/mazanax) for the pull request!
-
-## [3.6.0] - 2017-03-01
-### Added
-- Pull request #16: [Pass the curlOptions to the client in buildClient](https://github.com/sendgrid/php-http-client/pull/16)
-- Thanks to [Baptiste Clavié](https://github.com/Taluu) for the pull request!
-
-## [3.5.1] - 2016-11-17
-### Fixed
-- Pull request #13, fixed issue #12: [Change from to php union operator to combine curl options](https://github.com/sendgrid/php-http-client/pull/13)
-- Thanks to [emil](https://github.com/emilva) for the pull request!
-
-## [3.5.0] - 2016-10-18
-### Added
-- Pull request #11: [Added curlOptions property to customize curl instance](https://github.com/sendgrid/php-http-client/pull/11)
-- Thanks to [Alain Tiemblo](https://github.com/ninsuo) for the pull request!
-
-## [3.4.0] - 2016-09-27
-### Added
-- Pull request #9: [Add getters for certain properties](https://github.com/sendgrid/php-http-client/pull/9)
-- Thanks to [Arjan Keeman](https://github.com/akeeman) for the pull request!
-
-## [3.3.0] - 2016-09-13
-### Added
-- Pull request #6: [Library refactoring around PSR-2 / PSR-4 code standards](https://github.com/sendgrid/php-http-client/pull/6)
-- Thanks to [Alexandr Ivanov](https://github.com/misantron) for the pull request!
-
-## [3.1.0] - 2016-06-10
-### Added
-- Automatically add Content-Type: application/json when there is a request body
-
-## [3.0.0] - 2016-06-06
-### Changed
-- Made the Request and Response variables non-redundant. e.g. request.requestBody becomes request.body
-
-## [2.0.2] - 2016-02-29
-### Fixed
-- Renaming files to conform to PSR-0, git ignored the case in 2.0.1
-
-## [2.0.1] - 2016-02-29
-### Fixed
-- Renaming files to conform to PSR-0
-
-## [1.0.1] - 2016-02-29
-### Fixed
-- Composer/Packagist install issues resolved
-
-## [1.0.0] - 2016-02-29
-### Added
-- We are live!
diff --git a/postman-smtp.php b/postman-smtp.php
index 6521fab..2413bbd 100644
--- a/postman-smtp.php
+++ b/postman-smtp.php
@@ -3,7 +3,7 @@
* Plugin Name: Post SMTP
* Plugin URI: https://wordpress.org/plugins/post-smtp/
* Description: Email not reliable? Post SMTP is the first and only WordPress SMTP plugin to implement OAuth 2.0 for Gmail, Hotmail and Yahoo Mail. Setup is a breeze with the Configuration Wizard and integrated Port Tester. Enjoy worry-free delivery even if your password changes!
- * Version: 2.0
+ * Version: 2.0.1
* Author: Yehuda Hassine
* Text Domain: post-smtp
* Author URI: https://postmansmtp.com
@@ -41,7 +41,7 @@
define( 'POST_BASE', __FILE__ );
define( 'POST_PATH', __DIR__ );
define( 'POST_URL', plugins_url('', POST_BASE ) );
-define( 'POST_SMTP_VER', '2.0' );
+define( 'POST_SMTP_VER', '2.0.1' );
$postman_smtp_exist = in_array( 'postman-smtp/postman-smtp.php', (array) get_option( 'active_plugins', array() ) );
$required_php_version = version_compare( PHP_VERSION, '5.6.0', '<' );
diff --git a/readme.txt b/readme.txt
index 41b4003..104855d 100644
--- a/readme.txt
+++ b/readme.txt
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=yehuda@m
Tags: postman smtp, postman, smtp, email, mail, mailer, email log, oauth2, gmail, google apps, hotmail, yahoo, mandrill api, sendgrid api, elastic email, office365, mailgun
Requires at least: 3.9
Tested up to: 5.2
-Stable tag: 2.0
+Stable tag: 2.0.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -289,7 +289,7 @@ To avoid being flagged as spam, you need to prove your email isn't forged. On a
== Changelog ==
-= 2.0 - 2019-05-15
+= 2.0.1 - 2019-05-15
* New: Mailer Type - Added an option to send without overwrite the 'wp_mail' function, better compability to WordPress delivery. hopefully will be the default in the future.
* Updated: Sendgrid API was upgraded and rewritten to the new version.
* Fixed: Message-Id header was missing on SMTP