SendinBlue Subscribe Form And WP SMTP - Version 3.1.1

Version Description

Improvements

  • Removed data validation so that DD-MM-YYY format is accepted as well
  • Improved monitoring of plugin technical performance
  • Updated WordPress Repository content by adding FAQ section
Download this release

Release Info

Developer neeraj_slit
Plugin Icon 128x128 SendinBlue Subscribe Form And WP SMTP
Version 3.1.1
Comparing to
See all releases

Code changes from version 3.1.0 to 3.1.1

inc/SendinblueApiClient.php CHANGED
@@ -279,7 +279,8 @@ class SendinblueApiClient
279
  'method' => $method,
280
  'headers' => [
281
  'api-key' => $this->apiKey,
282
- 'Content-Type' => 'application/json'
 
283
  ],
284
  ];
285
 
@@ -320,4 +321,4 @@ class SendinblueApiClient
320
  {
321
  return $this->lastResponseCode;
322
  }
323
- }
279
  'method' => $method,
280
  'headers' => [
281
  'api-key' => $this->apiKey,
282
+ 'Content-Type' => 'application/json',
283
+ 'User-Agent' => 'sendinblue_plugins/wordpress'
284
  ],
285
  ];
286
 
321
  {
322
  return $this->lastResponseCode;
323
  }
324
+ }
inc/sib-api-manager.php CHANGED
@@ -409,7 +409,41 @@ if ( ! class_exists( 'SIB_API_Manager' ) ) {
409
  }
410
  else {
411
  $info[ $value["name"] ] = false;
412
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
413
  }
414
  }
415
 
409
  }
410
  else {
411
  $info[ $value["name"] ] = false;
412
+ }
413
+ if( "date" == $value["type"] && array_key_exists($value["name"], $info) ) {
414
+ $date = $info[ $value["name"] ];
415
+ $tempDate = explode('-', $date);
416
+ $error = false;
417
+ foreach ( $tempDate as $key => $val ) {
418
+ if ( $val == "0" || $val == "00" || $val == "0000" ) {
419
+ $error = true;
420
+ }
421
+ }
422
+ if ( $error ) {
423
+ wp_send_json(
424
+ array(
425
+ 'status' => 'failure',
426
+ 'msg' => [
427
+ 'errorMsg' => 'Date format is invalid',
428
+ ]
429
+ )
430
+ );
431
+ } else {
432
+ try {
433
+ $dateCheck = (new DateTime($date))->format('Y-m-d');
434
+ $info[ $value["name"] ] = $dateCheck;
435
+ } catch (Exception $exception) {
436
+ wp_send_json(
437
+ array(
438
+ 'status' => 'failure',
439
+ 'msg' => [
440
+ 'errorMsg' => 'Date format is invalid',
441
+ ]
442
+ )
443
+ );
444
+ }
445
+ }
446
+ }
447
  }
448
  }
449
 
js/mailin-front.js CHANGED
@@ -89,25 +89,6 @@ jQuery(document).ready(function(){
89
  return;
90
  }
91
 
92
- /**
93
- * Check dateformat
94
- */
95
- err_index = 0;
96
- jQuery.each(form.find('.sib-date') , function(){
97
- var date = jQuery(this).val();
98
- //pattern for yyyy-mm-dd
99
- var validatePattern = /^(\d{4})(-)(\d{1,2})(-)(\d{1,2})$/;
100
- if (date !== '' && !validatePattern.test(date))
101
- {
102
- err_index++;
103
- }
104
- });
105
- if(err_index > 0)
106
- {
107
- form.find('.sib_msg_disp').html('<p class="sib-alert-message sib-alert-message-warning ">' + sibErrMsg.invalidDateFormat + '</p>').show();
108
- return;
109
- }
110
-
111
  // Check sms validation
112
  err_index = 0;
113
  jQuery.each(form.find('.sib-sms'), function () {
89
  return;
90
  }
91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  // Check sms validation
93
  err_index = 0;
94
  jQuery.each(form.find('.sib-sms'), function () {
page/page-campaigns.php DELETED
@@ -1,143 +0,0 @@
1
- <?php
2
- /**
3
- * Admin page : dashboard
4
- *
5
- * @package SIB_Page_Campaigns
6
- */
7
-
8
- if ( ! class_exists( 'SIB_Page_Campaigns' ) ) {
9
- /**
10
- * Page class that handles backend page <i>dashboard ( for admin )</i> with form generation and processing
11
- *
12
- * @package SIB_Page_Campaigns
13
- */
14
- class SIB_Page_Campaigns {
15
-
16
- /**
17
- * Page slug
18
- */
19
- const PAGE_ID = 'sib_page_campaigns';
20
-
21
- /**
22
- * Page hook
23
- *
24
- * @var string
25
- */
26
- protected $page_hook;
27
-
28
- /**
29
- * Page tabs
30
- *
31
- * @var mixed
32
- */
33
- protected $tabs;
34
-
35
- /**
36
- * Constructs new page object and adds entry to WordPress admin menu
37
- */
38
- function __construct() {
39
- $this->page_hook = add_submenu_page( SIB_Page_Home::PAGE_ID, __( 'Campaigns', 'sib_lang' ), __( 'Campaigns', 'sib_lang' ), 'manage_options', self::PAGE_ID, array( &$this, 'generate' ) );
40
- add_action( 'load-' . $this->page_hook, array( &$this, 'init' ) );
41
- add_action( 'admin_print_scripts-' . $this->page_hook, array( $this, 'enqueue_scripts' ) );
42
- add_action( 'admin_print_styles-' . $this->page_hook, array( $this, 'enqueue_styles' ) );
43
- }
44
-
45
- /**
46
- * Init Process
47
- */
48
- function Init() {
49
- add_action( 'admin_notices', array( 'SIB_Manager', 'language_admin_notice' ) );
50
- }
51
-
52
- /**
53
- * Enqueue scripts of plugin
54
- */
55
- function enqueue_scripts() {
56
- wp_enqueue_script( 'sib-admin-js' );
57
- wp_enqueue_script( 'sib-bootstrap-js' );
58
- wp_localize_script(
59
- 'sib-admin-js', 'ajax_sib_object',
60
- array(
61
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
62
- )
63
- );
64
- }
65
-
66
- /**
67
- * Enqueue style sheets of plugin
68
- */
69
- function enqueue_styles() {
70
- wp_enqueue_style( 'sib-admin-css' );
71
- wp_enqueue_style( 'sib-bootstrap-css' );
72
- wp_enqueue_style( 'sib-fontawesome-css' );
73
- wp_enqueue_style( 'thickbox' );
74
- }
75
-
76
- /** Generate page script */
77
- function generate() {
78
- ?>
79
- <div id="wrap1" class="box-border-box container-fluid">
80
- <div id="main-content" class="row">
81
- <?php
82
- if ( SIB_Manager::is_done_validation() ) {
83
- $this->generate_main_page();
84
- } else {
85
- $this->generate_welcome_page();
86
- }
87
- ?>
88
- </div>
89
- </div>
90
- <style>
91
- #wpcontent {
92
- margin-left: 160px !important;
93
- }
94
-
95
- @media only screen and (max-width: 918px) {
96
- #wpcontent {
97
- margin-left: 40px !important;
98
- }
99
- }
100
- </style>
101
- <?php
102
- }
103
-
104
- /** Generate main page */
105
- function generate_main_page() {
106
- $access_token = SIB_API_Manager::update_access_token();
107
- $lang = substr( get_bloginfo( 'language' ),0,2 );
108
-
109
- $sort = isset( $_GET['sort'] ) ? sanitize_text_field( $_GET['sort'] ) : 'sent_c';
110
-
111
- if ( '' === $access_token ) {
112
- ?>
113
- <p>Sorry Inconvenience. Please refresh</p>
114
- <?php
115
- } else {
116
- if ( 'create' === $sort ) {
117
- $type = isset( $_GET['type'] ) ? sanitize_text_field( $_GET['type'] ) : 'classic';
118
- ?>
119
- <iframe id="datamain"
120
- src="https://my.sendinblue.com/camp/step1/type/<?php echo esc_attr( $type ); ?>/access_token/<?php echo esc_attr( $access_token ); ?>?lang=<?php echo esc_attr( $lang ); ?>"
121
- width="100%" height="750" scrolling="yes"></iframe>
122
- <?php
123
- } else {
124
- ?>
125
- <iframe id="datamain"
126
- src="https://my.sendinblue.com/camp/lists/email/access_token/<?php echo esc_attr( $access_token ); ?>?lang=<?php echo esc_attr( $lang ); ?>#<?php echo esc_attr( $sort ); ?>"
127
- width="100%" height="750" scrolling="yes"></iframe>
128
-
129
- <?php
130
- }
131
- }
132
- }
133
-
134
- /** Generate welcome page */
135
- function generate_welcome_page() {
136
- ?>
137
- <img src="<?php echo esc_url( SIB_Manager::$plugin_url . '/img/background/campaigns.png' ); ?>" style="width: 100%;">
138
- <?php
139
- SIB_Page_Home::print_disable_popup();
140
- }
141
-
142
- }
143
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
page/page-lists.php DELETED
@@ -1,130 +0,0 @@
1
- <?php
2
- /**
3
- * Admin page : dashboard
4
- *
5
- * @package SIB_Page_Lists
6
- */
7
-
8
- if ( ! class_exists( 'SIB_Page_Lists' ) ) {
9
- /**
10
- * Page class that handles backend page <i>dashboard ( for admin )</i> with form generation and processing
11
- *
12
- * @package SIB_Page_Lists
13
- */
14
- class SIB_Page_Lists {
15
-
16
- /**
17
- * Page slug
18
- */
19
- const PAGE_ID = 'sib_page_lists';
20
-
21
- /**
22
- * Page hook
23
- *
24
- * @var string
25
- */
26
- protected $page_hook;
27
-
28
- /**
29
- * Page tabs
30
- *
31
- * @var mixed
32
- */
33
- protected $tabs;
34
-
35
- /**
36
- * Constructs new page object and adds entry to WordPress admin menu
37
- */
38
- function __construct() {
39
- $this->page_hook = add_submenu_page( SIB_Page_Home::PAGE_ID, __( 'Lists', 'sib_lang' ), __( 'Lists', 'sib_lang' ), 'manage_options', self::PAGE_ID, array( &$this, 'generate' ) );
40
- add_action( 'load-' . $this->page_hook, array( &$this, 'init' ) );
41
- add_action( 'admin_print_scripts-' . $this->page_hook, array( $this, 'enqueue_scripts' ) );
42
- add_action( 'admin_print_styles-' . $this->page_hook, array( $this, 'enqueue_styles' ) );
43
- }
44
-
45
- /**
46
- * Init Process
47
- */
48
- function Init() {
49
- add_action( 'admin_notices', array( 'SIB_Manager', 'language_admin_notice' ) );
50
- }
51
-
52
- /**
53
- * Enqueue scripts of plugin
54
- */
55
- function enqueue_scripts() {
56
- wp_enqueue_script( 'sib-admin-js' );
57
- wp_enqueue_script( 'sib-bootstrap-js' );
58
- wp_localize_script(
59
- 'sib-admin-js', 'ajax_sib_object',
60
- array(
61
- 'ajax_url' => admin_url( 'admin-ajax.php' ),
62
- )
63
- );
64
- }
65
-
66
- /**
67
- * Enqueue style sheets of plugin
68
- */
69
- function enqueue_styles() {
70
- wp_enqueue_style( 'sib-admin-css' );
71
- wp_enqueue_style( 'sib-bootstrap-css' );
72
- wp_enqueue_style( 'sib-fontawesome-css' );
73
- wp_enqueue_style( 'thickbox' );
74
- }
75
-
76
- /** Generate page script */
77
- function generate() {
78
- ?>
79
- <div id="wrap1" class="box-border-box container-fluid">
80
- <div id="main-content" class="row">
81
- <?php
82
- if ( SIB_Manager::is_done_validation() ) {
83
- $this->generate_main_page();
84
- } else {
85
- $this->generate_welcome_page();
86
- }
87
- ?>
88
- </div>
89
- </div>
90
- <style>
91
- #wpcontent {
92
- margin-left: 160px !important;
93
- }
94
-
95
- @media only screen and (max-width: 918px) {
96
- #wpcontent {
97
- margin-left: 40px !important;
98
- }
99
- }
100
- </style>
101
- <?php
102
- }
103
-
104
- /** Generate main page */
105
- function generate_main_page() {
106
- $access_token = SIB_API_Manager::update_access_token();
107
- $lang = substr( get_bloginfo( 'language' ),0,2 );
108
- if ( '' == $access_token ) {
109
- ?>
110
- <p>Sorry Inconvenience. Please refresh</p>
111
- <?php
112
- } else {
113
- ?>
114
- <iframe id="datamain"
115
- src="https://my.sendinblue.com/lists/index/access_token/<?php echo esc_attr( $access_token ); ?>?lang=<?php echo esc_attr( $lang ); ?>"
116
- width="100%" height="800" scrolling="yes"></iframe>
117
- <?php
118
- }
119
- }
120
-
121
- /** Generate welcome page */
122
- function generate_welcome_page() {
123
- ?>
124
- <img src="<?php echo esc_attr( SIB_Manager::$plugin_url ) . '/img/background/lists.png'; ?>" style="width: 100%;">
125
- <?php
126
- SIB_Page_Home::print_disable_popup();
127
- }
128
-
129
- }
130
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: neeraj_slit
3
  Tags: sendinblue, marketing automation, email marketing, email campaign, newsletter, wordpress smtp, subscription form, phpmailer, SMTP, wp_mail, massive email, sendmail, ssl, tls, wp-phpmailer, mail smtp, mailchimp, newsletters, email plugin, signup form, email widget, widget, plugin, sidebar, shortcode
4
  Requires at least: 4.4
5
- Tested up to: 5.5.1
6
  Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -80,28 +80,30 @@ To get a Sendinblue API key, you have to <a href="https://app.sendinblue.com/acc
80
  2. The Homepage gives you an overall view over your campaigns and allows you to activate Sendinblue SMTP for all transactional emails and Marketing Automation to better target your customers
81
  3. The Forms page gives you access to your forms list
82
  4. When you click on a specific form, you can configure your sign up process and customize it
83
- 5. The Lists page allows you to see, edit or filter, your lists and your contacts
84
- 6. The Campaigns page summarizes your most recent campaign performance and allows you to create a new campaign using our responsive and user-friendly email designer
85
- 7. The Statistics page gives you a global view over your performance: delivered, opened, clicked, etc.
86
- 8. From the Widget page, you are able to add the Sendinblue widget in one or more sidebars. For each form, you can choose the fields displayed and the list where contacts are saved.
87
- 9. The Workflows page (Marketing Automation activated) allows you to create new workflows in Sendinblue or access your logs or existing workflows
88
 
89
  == Frequently Asked Questions ==
90
 
91
  = What is Sendinblue? =
92
- Sendinblue is a powerful all-in-one marketing platform. Over 15,000 companies around the world trust Sendinblue to deliver their emails and SMS messages. Combining many powerful features, competitive pricing and excellent deliverability thanks to our proprietary cloud-based infrastructure, Sendinblue is available and supported in 6 languages: English, French, Spanish, German, Italian, and Portuguese.
 
 
93
 
94
  = Why use Sendinblue as an SMTP relay for my website? =
95
  By using Sendinblue’s SMTP, you will avoid the risk of having your legitimate emails ending up in the spam folder and you will have statistics on emails sent: deliverability, opens, clicks, etc. Sendinblue’s proprietary infrastructure optimizes your deliverability, enabling you to focus on your content.
96
 
97
  = Why do I need a Sendinblue account? =
98
- The Sendinblue for WordPress plugin uses Sendinblue’s API to synchronize contacts, send emails and get statistics. Creating an account on Sendinblue is free and takes less than 2 minutes. Once logged into your account, you can get the API key.
99
-
100
  = Do I have to pay to use the plugin and send emails? =
101
- No, the plugin is totally free and Sendinblue offers a free plan with 9,000 emails per month. If you need to send more than 9,000 emails / month, we invite you to see our pricing. For example, the Micro plan is $7.37 / month and allows you to send up to 40,000 emails per month. All Sendinblue plans are without any commitment.
 
102
 
103
  = How do I get my get synchronize my lists? =
104
- You have nothing to do - synchronization is automatic! It doesn't matter whether your lists were uploaded on your WordPress interface or on your Sendinblue account: they will always remain up-to-date on both sides.
 
105
 
106
  = How can I get support? =
107
  If you need some assistance, you can post an issue in the Support tab, or send us an email at contact@sendinblue.com.
@@ -109,10 +111,16 @@ If you need some assistance, you can post an issue in the Support tab, or send u
109
  = How do I create a signup form? =
110
  In order to create a signup form, you need to:
111
  1. Go to Wp admin > Sendinblue > Settings in order to define your form’s fields and settings
112
- 2. Integrate the form in a sidebar using a widget from WP panel > Appearance > Widgets. The Sendinblue widget form should appear in your widgets list, you just to have to drag and drop the widget into the sidebar of your choice.
113
 
114
  == Changelog ==
115
 
 
 
 
 
 
 
116
 
117
  = 3.1.0 =
118
  **Bug fixes**
2
  Contributors: neeraj_slit
3
  Tags: sendinblue, marketing automation, email marketing, email campaign, newsletter, wordpress smtp, subscription form, phpmailer, SMTP, wp_mail, massive email, sendmail, ssl, tls, wp-phpmailer, mail smtp, mailchimp, newsletters, email plugin, signup form, email widget, widget, plugin, sidebar, shortcode
4
  Requires at least: 4.4
5
+ Tested up to: 5.6
6
  Stable tag: trunk
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
80
  2. The Homepage gives you an overall view over your campaigns and allows you to activate Sendinblue SMTP for all transactional emails and Marketing Automation to better target your customers
81
  3. The Forms page gives you access to your forms list
82
  4. When you click on a specific form, you can configure your sign up process and customize it
83
+ 5. The Statistics page gives you a global view over your performance: delivered, opened, clicked, etc.
84
+ 6. From the Widget page, you are able to add the Sendinblue widget in one or more sidebars. For each form, you can choose the fields displayed and the list where contacts are saved.
85
+ 7. The Workflows page (Marketing Automation activated) allows you to create new workflows in Sendinblue or access your logs or existing workflows
 
 
86
 
87
  == Frequently Asked Questions ==
88
 
89
  = What is Sendinblue? =
90
+ Sendinblue is a powerful all-in-one marketing platform. Over 165 000 companies around the world trust Sendinblue to deliver their emails and SMS messages.
91
+ Sendinblue combines competitive pricing and excellent deliverability & powerful features such as Email, SMS, Facebook, Chat, CRM, and marketing automation.
92
+ Sendinblue is available and supported in 6 languages: English, French, Spanish, German, Italian, and Portuguese.
93
 
94
  = Why use Sendinblue as an SMTP relay for my website? =
95
  By using Sendinblue’s SMTP, you will avoid the risk of having your legitimate emails ending up in the spam folder and you will have statistics on emails sent: deliverability, opens, clicks, etc. Sendinblue’s proprietary infrastructure optimizes your deliverability, enabling you to focus on your content.
96
 
97
  = Why do I need a Sendinblue account? =
98
+ The Sendinblue for WordPress plugin uses Sendinblue’s API to synchronize contacts, send emails and get statistics. Creating an account on Sendinblue is free and takes less than 2 minutes. Once logged into your account, you can get the API key, and you can send up to 300 emails / day on the free (forever) plan.
99
+
100
  = Do I have to pay to use the plugin and send emails? =
101
+ No, the plugin is totally free and Sendinblue offers a free forever plan with 9,000 emails per month. Additionally, Sendinblue comes with unlimited contacts (including on the free plan), so there is no hidden cost.
102
+ If you need to send more than 300 emails / day, check out our pricing. Paid plans start at $25 / month to send up to 10 000 emails / month with no daily sending limit.
103
 
104
  = How do I get my get synchronize my lists? =
105
+ You have nothing to do synchronization is automatic! It doesnt matter whether your lists were uploaded on your WordPress interface or on your Sendinblue account: they will always remain up-to-date on both sides.
106
+ Sendinblue also integrates with most lead capture and advanced form builder plugins.
107
 
108
  = How can I get support? =
109
  If you need some assistance, you can post an issue in the Support tab, or send us an email at contact@sendinblue.com.
111
  = How do I create a signup form? =
112
  In order to create a signup form, you need to:
113
  1. Go to Wp admin > Sendinblue > Settings in order to define your form’s fields and settings
114
+ 2. Integrate the form in a sidebar using a widget from WP panel > Appearance > Widgets. The Sendinblue widget form should appear in your widgets list, you just to have to drag and drop the widget into the sidebar of your choice.
115
 
116
  == Changelog ==
117
 
118
+ = 3.1.1 =
119
+ **Improvements**
120
+
121
+ * Removed data validation so that DD-MM-YYY format is accepted as well
122
+ * Improved monitoring of plugin technical performance
123
+ * Updated WordPress Repository content by adding FAQ section
124
 
125
  = 3.1.0 =
126
  **Bug fixes**
screenshot-1.png CHANGED
Binary file
screenshot-2.png CHANGED
Binary file
screenshot-3.png CHANGED
Binary file
screenshot-4.png CHANGED
Binary file
screenshot-5.png CHANGED
Binary file
screenshot-6.png CHANGED
Binary file
screenshot-7.png CHANGED
Binary file
screenshot-8.png DELETED
Binary file
screenshot-9.png DELETED
Binary file
sendinblue.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Newsletter, SMTP, Email marketing and Subscribe forms by Sendinblue
4
  * Plugin URI: https://www.sendinblue.com/?r=wporg
5
  * Description: Manage your contact lists, subscription forms and all email and marketing-related topics from your wp panel, within one single plugin
6
- * Version: 3.1.0
7
  * Author: Sendinblue
8
  * Author URI: https://www.sendinblue.com/?r=wporg
9
  * License: GPLv2 or later
3
  * Plugin Name: Newsletter, SMTP, Email marketing and Subscribe forms by Sendinblue
4
  * Plugin URI: https://www.sendinblue.com/?r=wporg
5
  * Description: Manage your contact lists, subscription forms and all email and marketing-related topics from your wp panel, within one single plugin
6
+ * Version: 3.1.1
7
  * Author: Sendinblue
8
  * Author URI: https://www.sendinblue.com/?r=wporg
9
  * License: GPLv2 or later