SendGrid - Version 1.6.1

Version Description

  • Add unique arguments
Download this release

Release Info

Developer team-rs
Plugin Icon 128x128 SendGrid
Version 1.6.1
Comparing to
See all releases

Code changes from version 1.6 to 1.6.1

lib/overwrite-sendgrid-methods.php CHANGED
@@ -161,6 +161,7 @@ if ( ! function_exists('wp_mail'))
161
  // Headers
162
  $cc = array();
163
  $bcc = array();
 
164
  if ( empty( $headers ) ) {
165
  $headers = array();
166
  } else {
@@ -238,6 +239,20 @@ if ( ! function_exists('wp_mail'))
238
  case 'reply-to':
239
  $replyto = $content;
240
  break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
241
  default:
242
  // Add it to our grand headers array
243
  $headers[trim( $name )] = trim( $content );
161
  // Headers
162
  $cc = array();
163
  $bcc = array();
164
+ $unique_args = array();
165
  if ( empty( $headers ) ) {
166
  $headers = array();
167
  } else {
239
  case 'reply-to':
240
  $replyto = $content;
241
  break;
242
+ case 'unique-args':
243
+ if ( false !== strpos( $content, ';' ) ) {
244
+ $unique_args = explode( ';', $content );
245
+ }
246
+ else {
247
+ $unique_args = (array) trim( $content );
248
+ }
249
+ foreach ( $unique_args as $unique_arg ) {
250
+ if ( false !== strpos( $content, '=' ) ) {
251
+ list( $key, $val ) = explode( '=', $unique_arg );
252
+ $mail->addUniqueArg( trim( $key ), trim( $val ) );
253
+ }
254
+ }
255
+ break;
256
  default:
257
  // Add it to our grand headers array
258
  $headers[trim( $name )] = trim( $content );
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://sendgrid.com/
4
  Tags: email, email reliability, email templates, sendgrid, smtp, transactional email, wp_mail,email infrastructure, email marketing, marketing email, deliverability, email deliverability, email delivery, email server, mail server, email integration, cloud email
5
  Requires at least: 3.3
6
  Tested up to: 4.3
7
- Stable tag: 1.6
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -59,6 +59,7 @@ $headers = array();
59
  $headers[] = 'From: Me Myself <me@example.net>';
60
  $headers[] = 'Cc: address4@sendgrid.com';
61
  $headers[] = 'Bcc: address5@sendgrid.com';
 
62
 
63
  $attachments = array('/tmp/img1.jpg', '/tmp/img2.jpg');
64
 
@@ -121,6 +122,8 @@ Create a SendGrid account at <a href="http://sendgrid.com/partner/wordpress" tar
121
 
122
  == Changelog ==
123
 
 
 
124
  = 1.6 =
125
  * Fix setTo method in SMTP option, update documentation, add link to SendGrid portal
126
  = 1.5.4 =
@@ -170,6 +173,8 @@ Create a SendGrid account at <a href="http://sendgrid.com/partner/wordpress" tar
170
 
171
  == Upgrade notice ==
172
 
 
 
173
  = 1.6 =
174
  * Fix setTo method in SMTP option, update documentation, add link to SendGrid portal
175
  = 1.5.4 =
4
  Tags: email, email reliability, email templates, sendgrid, smtp, transactional email, wp_mail,email infrastructure, email marketing, marketing email, deliverability, email deliverability, email delivery, email server, mail server, email integration, cloud email
5
  Requires at least: 3.3
6
  Tested up to: 4.3
7
+ Stable tag: 1.6.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
59
  $headers[] = 'From: Me Myself <me@example.net>';
60
  $headers[] = 'Cc: address4@sendgrid.com';
61
  $headers[] = 'Bcc: address5@sendgrid.com';
62
+ $headers[] = 'unique-args:customer=mycustomer;location=mylocation'
63
 
64
  $attachments = array('/tmp/img1.jpg', '/tmp/img2.jpg');
65
 
122
 
123
  == Changelog ==
124
 
125
+ = 1.6.1 =
126
+ * Add unique arguments
127
  = 1.6 =
128
  * Fix setTo method in SMTP option, update documentation, add link to SendGrid portal
129
  = 1.5.4 =
173
 
174
  == Upgrade notice ==
175
 
176
+ = 1.6.1 =
177
+ * Add unique arguments
178
  = 1.6 =
179
  * Fix setTo method in SMTP option, update documentation, add link to SendGrid portal
180
  = 1.5.4 =
wpsendgrid.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: SendGrid
4
  Plugin URI: http://wordpress.org/plugins/sendgrid-email-delivery-simplified/
5
  Description: Email Delivery. Simplified. SendGrid's cloud-based email infrastructure relieves businesses of the cost and complexity of maintaining custom email systems. SendGrid provides reliable delivery, scalability and real-time analytics along with flexible APIs that make custom integration a breeze.
6
- Version: 1.6
7
  Author: SendGrid
8
  Author URI: http://sendgrid.com
9
  License: GPLv2
3
  Plugin Name: SendGrid
4
  Plugin URI: http://wordpress.org/plugins/sendgrid-email-delivery-simplified/
5
  Description: Email Delivery. Simplified. SendGrid's cloud-based email infrastructure relieves businesses of the cost and complexity of maintaining custom email systems. SendGrid provides reliable delivery, scalability and real-time analytics along with flexible APIs that make custom integration a breeze.
6
+ Version: 1.6.1
7
  Author: SendGrid
8
  Author URI: http://sendgrid.com
9
  License: GPLv2