Skip to content

Commit

Permalink
2.1.1.1
Browse files Browse the repository at this point in the history
FIX
Sendinblue email header
  • Loading branch information
smusman98 committed Jul 18, 2022
1 parent e9b82c8 commit 63c6b42
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 24 deletions.
41 changes: 26 additions & 15 deletions Postman/Postman-Mail/PostmanSendinblueMailEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ public function send( PostmanMessage $message ) {

$sender = $message->getFromAddress();
$senderEmail = !empty( $sender->getEmail() ) ? $sender->getEmail() : $options->getMessageSenderEmail();
$senderName = !empty( $sender->getName() ) ? $sender->getName() : $options->getMessageSenderName();
$senderName = !empty( $sender->getName() ) ? $sender->getName() : $options->getMessageSenderName();
$headers = array();

$sender->log( $this->logger, 'From' );
$sender->log( $this->logger, 'From' );

$sendSmtpEmail['sender'] = array(
'name' => $senderName,
Expand All @@ -109,9 +109,13 @@ public function send( PostmanMessage $message ) {
if ( !array_key_exists( $recipient->getEmail(), $duplicates ) ) {

$tos[] = array(
'email' => $recipient->getEmail(),
'name' => '$recipient->getName()'
'email' => $recipient->getEmail()
);

if( !empty( $recipient->getName() ) ) {
$tos['name'] = $recipient->getName();
}

$duplicates[] = $recipient->getEmail();

}
Expand All @@ -138,9 +142,12 @@ public function send( PostmanMessage $message ) {
// $replyTo is null or a PostmanEmailAddress object
if ( isset( $replyTo ) ) {
$sendSmtpEmail['replyTo'] = array(
'email' => $replyTo->getEmail(),
'name' => '$replyTo->getName()'
'email' => $replyTo->getEmail()
);

if( !empty( $replyTo->getName() ) ) {
$sendSmtpEmail['name'] = $replyTo->getName();
}
}

// add the Postman signature - append it to whatever the user may have set
Expand Down Expand Up @@ -176,16 +183,20 @@ public function send( PostmanMessage $message ) {

$recipient->log($this->logger, 'Cc');
$cc[] = array(
'name' => '$recipient->getName()',
'email' => $recipient->getEmail()
);

if( !empty( $recipient->getName() ) ) {
$cc['name'] = $recipient->getName();
}

$duplicates[] = $recipient->getEmail();

}

}
if( !empty( $cc ) )
$sendSmtpEmail['cc'] = $cc;
$sendSmtpEmail['cc'] = $cc;

$bcc = array();
$duplicates = array();
Expand All @@ -205,7 +216,7 @@ public function send( PostmanMessage $message ) {
}

if( !empty( $bcc ) )
$sendSmtpEmail['bcc'] = $bcc;
$sendSmtpEmail['bcc'] = $bcc;

// add attachments
$this->logger->debug( 'Adding attachments' );
Expand Down Expand Up @@ -237,12 +248,12 @@ public function send( PostmanMessage $message ) {
}

$response = $apiInstance->sendTransacEmail($sendSmtpEmail);
$this->transcript = print_r( $response, true );
$this->transcript .= PostmanModuleTransport::RAW_MESSAGE_FOLLOWS;
$this->transcript .= print_r( $sendSmtpEmail, true );
$this->logger->debug( 'Transcript=' . $this->transcript );
$this->transcript = print_r( $response, true );
$this->transcript .= PostmanModuleTransport::RAW_MESSAGE_FOLLOWS;
$this->transcript .= print_r( $sendSmtpEmail, true );
$this->logger->debug( 'Transcript=' . $this->transcript );
} catch (Exception $e) {

$this->transcript = $e->getMessage();
Expand Down
4 changes: 2 additions & 2 deletions postman-smtp.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,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.1.1
* Version: 2.1.1.1
* Author: Post SMTP
* Text Domain: post-smtp
* Author URI: https://postmansmtp.com
Expand Down Expand Up @@ -35,7 +35,7 @@
define( 'POST_SMTP_BASE', __FILE__ );
define( 'POST_SMTP_PATH', __DIR__ );
define( 'POST_SMTP_URL', plugins_url('', POST_SMTP_BASE ) );
define( 'POST_SMTP_VER', '2.1.1' );
define( 'POST_SMTP_VER', '2.1.1.1' );
define( 'POST_SMTP_ASSETS', plugin_dir_url( __FILE__ ) . 'assets/' );

$postman_smtp_exist = in_array( 'postman-smtp/postman-smtp.php', (array) get_option( 'active_plugins', array() ) );
Expand Down
19 changes: 12 additions & 7 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributors: wpexpertsio
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: 6.0
Stable tag: 2.1.1
Stable tag: 2.1.1.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand All @@ -30,8 +30,6 @@ Post SMTP is *not* another WP Mail SMTP clone like WP Bank or Easy SMTP. It repl
= The Most Fast And Easy =
See how fast and easy to setup Post SMTP with Google/Gsuite or any SMTP service.

https://www.youtube.com/watch?v=z-x1DhcAN0o

= Standard Features =
* Easy-to-use, powerful Setup Wizard for perfect configuration
* Commercial-grade Connectivity Tester to diagnose server issues
Expand All @@ -48,19 +46,22 @@ https://www.youtube.com/watch?v=z-x1DhcAN0o
* Gmail: By combining OAuth2 and the Gmail API, Post can deliver where other plugins can not

= API (HTTPS) Email Support =
* Gmail API for sending Gmail and Google Apps email (requires a [Google](https://accounts.google.com/signup) account)
* **Gmail API for sending Gmail and Google Apps email** (requires a [Google](https://accounts.google.com/signup) account)
Often bloggers and small business owners don't want to use third-party SMTP services. Well you can use your Gmail or G Suite account for SMTP emails.
<a href="https://www.cloudways.com/blog/post-smtp-mailer-fork-of-wordpress-postman-smtp-plugin/" rel="friend">Check the guide I wrote</a>

* Mandrill API for sending any email (requires a [Mandrill](http://www.mandrillapp.com) account)
* **Mandrill API for sending any email** (requires a [Mandrill](http://www.mandrillapp.com) account)
Mandrill is an email infrastructure service offered as an add-on for MailChimp that you can use to send personalized, one-to-one e-commerce emails, or automated transactional emails.

* Mailgun API for sending any email (requires a [Mailgun](http://www.mailgun.com) account)
* **Mailgun API for sending any email** (requires a [Mailgun](http://www.mailgun.com) account)
Mailgun SMTP is a popular SMTP service provider that allows you to send large quantities of emails. They allow you to send your first 10,000 emails for free every month.

* SendGrid API for sending any email (requires a [SendGrid](https://sendgrid.com) account and PHP 5.3)
* **SendGrid API for sending any email** (requires a [SendGrid](https://sendgrid.com) account and PHP 5.3)
SendGrid has a free SMTP plan that you can use to send up to 100 emails per day. With our native SendGrid SMTP integration, you can easily and securely set up SendGrid SMTP on your WordPress site.

* **Sendinblue API for sending any email** (requires a [Sendinblue](https://www.sendinblue.com/) account and PHP 5.3)
SendinBlue is an effective and great email software for Small to Medium businesses. You can build customer relationships with an all-in-one digital marketing toolbox. Their free plan allows you to send up to 300 emails per day.

> Post SMTP needs [translators](https://translate.wordpress.org/projects/wp-plugins/post-smtp/stable)! If you are a non-English speaker, please get involved!

= Compatibile With.. =
Expand Down Expand Up @@ -281,6 +282,10 @@ To avoid being flagged as spam, you need to prove your email isn't forged. On a

== Changelog ==

= 2.1.1.1 - 2022-06-15 =
**FIX**
* Sendinblue email header

= 2.1.1 - 2022-06-09 =
**FIX**
* PHP Version Compatibility.
Expand Down

0 comments on commit 63c6b42

Please sign in to comment.