WordPress Email Marketing Plugin – WP Email Capture - Version 3.3

Version Description

  • Introduced the ability to have "HTML" enabled lists.
  • Introduced the ability to send emails without headers. Useful for Amazon SES.
  • Added a charset on export of CSV. (Props Ov3rfly)
Download this release

Release Info

Developer rhyswynne
Plugin Icon 128x128 WordPress Email Marketing Plugin – WP Email Capture
Version 3.3
Comparing to
See all releases

Code changes from version 3.2 to 3.3

Files changed (8) hide show
  1. inc/exportcsv.php +5 -1
  2. inc/functions.php +57 -10
  3. inc/install.php +1 -1
  4. inc/options.php +24 -3
  5. inc/process.php +76 -20
  6. readme.md +4 -4
  7. readme.txt +17 -12
  8. wp-email-capture.php +4 -2
inc/exportcsv.php CHANGED
@@ -10,11 +10,13 @@ function wp_email_capture_export() {
10
 
11
  global $wpdb;
12
  $delimeter = get_option( 'wp_email_capture_name_delimeter' );
 
13
 
14
  if ( !$delimeter ) {
15
  $delimeter = ",";
16
  }
17
 
 
18
  $csv_output = "";
19
  $csv_output .= __( 'Name', 'wp-email-capture' ). $delimeter .__( 'Email', 'wp-email-capture' );
20
  $csv_output .= "\n";
@@ -33,7 +35,9 @@ function wp_email_capture_export() {
33
  $file_prefix = 'WP_Email_Capture';
34
  $filename = apply_filters( 'wpec_change_csv_filename', $file_prefix."_".date( "Y-m-d_H-i", time() ));
35
 
36
- header( "Content-type: application/vnd.ms-excel" );
 
 
37
 
38
  header( "Content-disposition: csv" . date( "Y-m-d" ) . ".csv" );
39
 
10
 
11
  global $wpdb;
12
  $delimeter = get_option( 'wp_email_capture_name_delimeter' );
13
+ $charset = get_bloginfo( 'charset' );
14
 
15
  if ( !$delimeter ) {
16
  $delimeter = ",";
17
  }
18
 
19
+ //$csv_output = "\xEF\xBB\xBF"; //UTF-8 BOM;
20
  $csv_output = "";
21
  $csv_output .= __( 'Name', 'wp-email-capture' ). $delimeter .__( 'Email', 'wp-email-capture' );
22
  $csv_output .= "\n";
35
  $file_prefix = 'WP_Email_Capture';
36
  $filename = apply_filters( 'wpec_change_csv_filename', $file_prefix."_".date( "Y-m-d_H-i", time() ));
37
 
38
+ header( "Content-type: application/vnd.ms-excel charset=" . $charset );
39
+ header( "Content-type: application/x-msexcel; charset=" . $charset );
40
+ //header( "Content-Type: text/html; charset=utf-8");
41
 
42
  header( "Content-disposition: csv" . date( "Y-m-d" ) . ".csv" );
43
 
inc/functions.php CHANGED
@@ -99,10 +99,10 @@ function wp_email_capture_admin_upsell() {
99
  echo '<div class="updated welcome-panel" style="padding: 23px 10px 0;">';
100
  printf( __( '<a href="%1$s" class="welcome-panel-close">Hide Notice</a>
101
  <div class="welcome-panel-content">
102
- <h3>WP Email Capture - Over 500 Emails</h3>
103
- <p>WP Email Capture has over 500 entries. Whilst the plugin is free for use forever, it does struggle a bit with very large lists.</p>
104
- <p>WP Email Caputre Premium is better suited to large lists, so please consider upgrading. As a thank you for using us for so long, use discount code <strong>%3$s</strong> for <strong>%4$s</strong> off.</p>
105
- <p><a href="%2$s" class="button button-primary button-hero"><strong>Upgrade WP Email Capture</strong></a></p></div>' ), '?wp_email_capture_upsell_ignore=0', $upgradeurl, $discountcode, $discountamount );
106
  echo "</div>";
107
  }
108
  }
@@ -161,8 +161,8 @@ function wp_email_capture_get_number_of_registered_users() {
161
  $registered_members_table = WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE;
162
  global $wpdb;
163
  $get_number_of_regs_sql = '
164
- SELECT COUNT(*)
165
- FROM ' . WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE;
166
 
167
  $get_number_of_regs = $wpdb->get_var( $get_number_of_regs_sql );
168
 
@@ -180,10 +180,10 @@ function wp_email_capture_get_last_singup_date() {
180
 
181
  global $wpdb;
182
  $get_last_date_sql = '
183
- SELECT `date`
184
- FROM ' . WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE . '
185
- ORDER BY `date` DESC
186
- LIMIT 1';
187
 
188
  $get_last_date = $wpdb->get_var( $get_last_date_sql );
189
 
@@ -193,4 +193,51 @@ function wp_email_capture_get_last_singup_date() {
193
  return false;
194
  }
195
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  }
99
  echo '<div class="updated welcome-panel" style="padding: 23px 10px 0;">';
100
  printf( __( '<a href="%1$s" class="welcome-panel-close">Hide Notice</a>
101
  <div class="welcome-panel-content">
102
+ <h3>WP Email Capture - Over 500 Emails</h3>
103
+ <p>WP Email Capture has over 500 entries. Whilst the plugin is free for use forever, it does struggle a bit with very large lists.</p>
104
+ <p>WP Email Caputre Premium is better suited to large lists, so please consider upgrading. As a thank you for using us for so long, use discount code <strong>%3$s</strong> for <strong>%4$s</strong> off.</p>
105
+ <p><a href="%2$s" class="button button-primary button-hero"><strong>Upgrade WP Email Capture</strong></a></p></div>' ), '?wp_email_capture_upsell_ignore=0', $upgradeurl, $discountcode, $discountamount );
106
  echo "</div>";
107
  }
108
  }
161
  $registered_members_table = WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE;
162
  global $wpdb;
163
  $get_number_of_regs_sql = '
164
+ SELECT COUNT(*)
165
+ FROM ' . WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE;
166
 
167
  $get_number_of_regs = $wpdb->get_var( $get_number_of_regs_sql );
168
 
180
 
181
  global $wpdb;
182
  $get_last_date_sql = '
183
+ SELECT `date`
184
+ FROM ' . WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE . '
185
+ ORDER BY `date` DESC
186
+ LIMIT 1';
187
 
188
  $get_last_date = $wpdb->get_var( $get_last_date_sql );
189
 
193
  return false;
194
  }
195
 
196
+ }
197
+
198
+
199
+ /**
200
+ * Set the email type to text/html
201
+ * @return string "text/html"
202
+ */
203
+ function wp_email_capture_set_html_mail_content_type() {
204
+ return 'text/html';
205
+ }
206
+
207
+
208
+ /**
209
+ * Set the email type to text/plain
210
+ *
211
+ * Happens after sending an email.
212
+ *
213
+ * @return string "text/plain"
214
+ */
215
+ function wp_email_capture_set_plain_content_type() {
216
+ return 'text/plain';
217
+ } add_filter( 'wp_mail_content_type', 'wp_email_capture_set_plain_content_type' );
218
+
219
+
220
+ /**
221
+ * Set email to HTML, if you wish to.
222
+ *
223
+ * @return void
224
+ */
225
+ function wp_email_capture_set_email_to_html() {
226
+
227
+ if ( 1 == get_option( 'wp_email_capture_send_email_html' ) ) {
228
+ add_filter( 'wp_mail_content_type', 'wp_email_capture_set_html_mail_content_type' );
229
+ }
230
+
231
+ }
232
+
233
+
234
+ /**
235
+ * Return email to standard email.
236
+ *
237
+ * @return void
238
+ */
239
+ function wp_email_capture_set_email_to_plain() {
240
+ if ( 1 == get_option( 'wp_email_capture_send_email_html' ) ) {
241
+ add_filter( 'wp_mail_content_type', 'wp_email_capture_set_plain_content_type' );
242
+ }
243
  }
inc/install.php CHANGED
@@ -34,7 +34,7 @@ function wp_email_capture_install() {
34
  email TEXT NOT NULL ,
35
  confirm_code TEXT NOT NULL ,
36
  date DATETIME NOT NULL ,
37
- UNIQUE KEY (id)) $charset_collate;";
38
 
39
  dbDelta( $create_temp_members_table_sql );
40
 
34
  email TEXT NOT NULL ,
35
  confirm_code TEXT NOT NULL ,
36
  date DATETIME NOT NULL ,
37
+ UNIQUE KEY id (id)) $charset_collate;";
38
 
39
  dbDelta( $create_temp_members_table_sql );
40
 
inc/options.php CHANGED
@@ -139,7 +139,7 @@ function wp_email_capture_dashboard() {
139
  <h3><?php _e('Translations', 'wp-email-capture' ); ?></h3>
140
  <ul>
141
  <li><?php echo sprintf( __( '<strong>French Translation:</strong> <a href="%s" target="_blank">Olivier</a> & <a href="%s" target="_blank">Andrew Patton</a> <a href="%s" target="_blank">(@andpatton)</a>.','wp-email-capture' ), 'http://www.ticket-system.net/', 'http://www.acusti.ca/', 'http://twitter.com/andpatton' ); ?></li>
142
- <li><?php echo sprintf( __( '<strong>German Translation:</strong> <a href="%s" target="_blank">Stephan</a>, <a href="%s" target="_blank">Marc Nilius</a> <a href="%s" target="_blank">(@libertello)</a> &amp; Ov3rFly', 'wp-email-capture' ), 'http://www.computersniffer.com/', 'http://www.libertello.de/', 'http://twitter.com/libertello' ); ?></li>
143
  <li><?php echo sprintf( __( '<strong>Brazilian Portugese Translation:</strong> <a href="%s" target="_blank">Nick Lima</a> <a href="%s" target="_blank">(@nick_linux)</a>', 'wp-email-capture' ), 'http://www.nicklima.com.br', 'http://twitter.com/nick_linux' ); ?></li>
144
  <li><?php echo sprintf( __( '<strong>Dutch Translation:</strong> <a href="%s" target="_blank">Sander</a>', 'wp-email-capture' ), 'http://www.zanderz.net/' ); ?></li>
145
  <li><?php echo sprintf( __( '<strong>Hungarian Translation:</strong> <a href="%s" target="_blank">Surbma</a>', 'wp-email-capture' ), 'http://surbma.hu/' ); ?></li>
@@ -245,7 +245,7 @@ function wp_email_capture_free_options() {
245
 
246
  <tr class="wp_email_capture_admin_discount <?php echo $prechecked; ?>">
247
  <td colspan="2">
248
- <?php printf( __( 'Thanks for linking to us! As a thank you, use code <strong>LINK20</strong> to get 20&#37; off <a href="%s">WP Email Capture Premium</a>, or any extension from the <a href="%s">WP Email Capture Shop</a>.', 'wp-email-capture' ), 'https://www.wpemailcapture.com/premium/?utm_source=plugin-dashboard&utm_medium=plugin&utm_term=checkedlink&utm_campaign=wpemailcapture', 'https://www.wpemailcapture.com/downloads/?utm_source=plugin-dashboard&utm_medium=plugin&utm_term=checkedlink&utm_campaign=wpemailcapture' ); ?>
249
  </td>
250
  </tr>
251
 
@@ -267,13 +267,30 @@ function wp_email_capture_free_options() {
267
 
268
  </tr>
269
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
  </tbody>
271
 
272
  </table>
273
 
274
  <input type="hidden" name="action" value="update" />
275
 
276
- <input type="hidden" name="page_options" value="wp_email_capture_redirection,wp_email_capture_from,wp_email_capture_subject,wp_email_capture_signup,wp_email_capture_body,wp_email_capture_from_name,wp_email_capture_link,wp_email_capture_name_required,wp_email_capture_name_delimeter" />
277
 
278
  <p class="submit">
279
 
@@ -371,6 +388,10 @@ function wp_email_capture_options_process() { // whitelist options
371
 
372
  register_setting( 'wp-email-capture-group', 'wp_email_capture_name_delimeter' );
373
 
 
 
 
 
374
  if ( isset( $_REQUEST['wp_email_capture_export'] ) ) {
375
 
376
  wp_email_capture_export();
139
  <h3><?php _e('Translations', 'wp-email-capture' ); ?></h3>
140
  <ul>
141
  <li><?php echo sprintf( __( '<strong>French Translation:</strong> <a href="%s" target="_blank">Olivier</a> & <a href="%s" target="_blank">Andrew Patton</a> <a href="%s" target="_blank">(@andpatton)</a>.','wp-email-capture' ), 'http://www.ticket-system.net/', 'http://www.acusti.ca/', 'http://twitter.com/andpatton' ); ?></li>
142
+ <li><?php echo sprintf( __( '<strong>German Translation:</strong> <a href="%s" target="_blank">Stephan</a>, <a href="%s" target="_blank">Marc Nilius</a> <a href="%s" target="_blank">(@libertello)</a>, Ov3rFly &amp; <a href="%s">Lars Kasper</a>', 'wp-email-capture' ), 'http://www.computersniffer.com/', 'http://www.libertello.de/', 'http://twitter.com/libertello', 'http://larskasper.de/' ); ?></li>
143
  <li><?php echo sprintf( __( '<strong>Brazilian Portugese Translation:</strong> <a href="%s" target="_blank">Nick Lima</a> <a href="%s" target="_blank">(@nick_linux)</a>', 'wp-email-capture' ), 'http://www.nicklima.com.br', 'http://twitter.com/nick_linux' ); ?></li>
144
  <li><?php echo sprintf( __( '<strong>Dutch Translation:</strong> <a href="%s" target="_blank">Sander</a>', 'wp-email-capture' ), 'http://www.zanderz.net/' ); ?></li>
145
  <li><?php echo sprintf( __( '<strong>Hungarian Translation:</strong> <a href="%s" target="_blank">Surbma</a>', 'wp-email-capture' ), 'http://surbma.hu/' ); ?></li>
245
 
246
  <tr class="wp_email_capture_admin_discount <?php echo $prechecked; ?>">
247
  <td colspan="2">
248
+ <?php printf( __( 'Thanks for linking to us! As a thank you, use code <strong>LINK20</strong> to get 20&#37; off <a href="%s">WP Email Capture Premium</a>, or any extension from the <a href="%s">WP Email Capture Shop</a>.', 'wp-email-capture' ), 'https://www.wpemailcapture.com/premium/?utm_source=plugin-options&utm_medium=plugin&utm_term=checkedlink&utm_campaign=wpemailcapture', 'https://www.wpemailcapture.com/downloads/?utm_source=plugin-options&utm_medium=plugin&utm_term=checkedlink&utm_campaign=wpemailcapture' ); ?>
249
  </td>
250
  </tr>
251
 
267
 
268
  </tr>
269
 
270
+ <tr valign="top">
271
+
272
+ <th scope="row" style="width:400px"><?php _e( 'Send HTML email?', 'wp-email-capture' ); ?></th>
273
+
274
+ <td><input type="checkbox" name="wp_email_capture_send_email_html" value="1" <?php checked( get_option( 'wp_email_capture_send_email_html' ), 1 ); ?> /></td>
275
+
276
+ </tr>
277
+
278
+ <tr valign="top">
279
+
280
+ <th scope="row" style="width:400px"><?php _e( 'Disable Headers', 'wp-email-capture' ); ?></th>
281
+
282
+ <td><input type="checkbox" name="wp_email_capture_disabled_headers" value="1" <?php checked( get_option( 'wp_email_capture_disabled_headers' ), 1 ); ?> /><br/>
283
+ <span class="description"><?php _e( 'If you are having problems with sending emails (such as with Amazon SES), disable this','wp-email-capture' ); ?></span></td>
284
+
285
+ </tr>
286
+
287
  </tbody>
288
 
289
  </table>
290
 
291
  <input type="hidden" name="action" value="update" />
292
 
293
+ <input type="hidden" name="page_options" value="wp_email_capture_redirection,wp_email_capture_from,wp_email_capture_subject,wp_email_capture_signup,wp_email_capture_body,wp_email_capture_from_name,wp_email_capture_link,wp_email_capture_name_required,wp_email_capture_name_delimeter,wp_email_capture_send_email_html,wp_email_capture_disabled_headers" />
294
 
295
  <p class="submit">
296
 
388
 
389
  register_setting( 'wp-email-capture-group', 'wp_email_capture_name_delimeter' );
390
 
391
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_send_email_html' );
392
+
393
+ register_setting( 'wp-email-capture-group', 'wp_email_capture_disabled_headers' );
394
+
395
  if ( isset( $_REQUEST['wp_email_capture_export'] ) ) {
396
 
397
  wp_email_capture_export();
inc/process.php CHANGED
@@ -10,6 +10,8 @@
10
  */
11
  function wp_email_capture_process() {
12
 
 
 
13
  if ( isset( $_REQUEST['wp_capture_action'] ) ) {
14
 
15
  do_action( 'wp_email_capture_signup_actions' );
@@ -23,7 +25,7 @@ function wp_email_capture_process() {
23
  //wp_capture_email_confirm();
24
  }
25
 
26
-
27
 
28
  }
29
 
@@ -171,20 +173,24 @@ function wp_email_capture_signup() {
171
  $fromname = get_option( 'blogname' );
172
  }
173
 
 
 
174
  $header = "MIME-Version: 1.0\n" . "From: " . $fromname . " <" . $from . ">\n";
175
- $header .= "Content-Type: text/plain; charset=\"" . get_option( 'blog_charset' ) . "\"\n";
176
 
177
  // Your message
 
 
178
 
179
- $message.= get_option( 'wp_email_capture_body' ) . "\n\n";
180
 
181
- if ( $message == "\n\n" ) {
182
  $message .= __( "Thank you for signing up for our newsletter, please click the link below to confirm your subscription", "wp-email-capture" ) . "\n\n";
183
  }
184
 
185
- $message .= $siteurl ."?wp_email_confirm=1&wp_email_capture_passkey=$confirm_code";
186
- $message .= "\n\n----\n";
187
- $message .= __( "This is an automated message that is generated because somebody with the IP address of", 'wp-email-capture' )." " . $ip ." ".__( '(possibly you) on', 'wp-email-capture' )." ". $date ." ".__( 'filled out the form on the following page', 'wp-email-capture' )." " . $referrer . "\n";
188
  $message .= __( "If you are sure this isn't you, please ignore this message, you will not be sent another message.", 'wp-email-capture' );
189
  $message = str_replace( "%NAME%", $name, $message );
190
 
@@ -287,7 +293,7 @@ function wp_capture_email_confirm() {
287
  $emaildataarray = array(
288
  'name' => $name,
289
  'email' => $email
290
- );
291
 
292
  do_action( 'wp_email_capture_complete_before_redirect', $emaildataarray );
293
 
@@ -295,20 +301,20 @@ function wp_capture_email_confirm() {
295
  echo "<meta http-equiv='refresh' content='0;". $fullreg ."'>";
296
  die();
297
 
298
- /* } */
299
 
300
- } else {
301
 
302
- if ( strpos( $url, "?" ) === false ) { $extrastring = "?"; } else { $extrastring = "&"; }
303
-
304
- $error = urlencode( __( 'Wrong confirmation code', 'wp-email-capture' ) );
305
- $url = $url . $extrastring . "wp_email_capture_error=" . $error;
306
 
307
- wp_redirect( $url );
308
- die();
 
 
 
309
 
 
310
  }
311
- }
312
 
313
 
314
 
@@ -322,9 +328,59 @@ function wp_capture_email_confirm() {
322
  */
323
  function wp_email_capture_send_email_default( $to, $subject, $message, $header ) {
324
 
325
- $sendmail = wp_mail( $to, $subject, $message, $header);
 
 
 
 
 
 
 
 
326
 
327
- if ( $sendmail ) { $addedfield = "Email Sent!"; } else { $addedfield = "Email Not Sent"; }
 
 
 
 
 
 
328
 
329
- return $sendmail;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
330
  }
10
  */
11
  function wp_email_capture_process() {
12
 
13
+ do_action( 'wp_email_capture_set_wp_email_capture_email_settings' );
14
+
15
  if ( isset( $_REQUEST['wp_capture_action'] ) ) {
16
 
17
  do_action( 'wp_email_capture_signup_actions' );
25
  //wp_capture_email_confirm();
26
  }
27
 
28
+ do_action( 'wp_email_capture_set_normal_email_settings' );
29
 
30
  }
31
 
173
  $fromname = get_option( 'blogname' );
174
  }
175
 
176
+ $contenttype = ( 1 == get_option( 'wp_email_capture_send_email_html' ) ) ? "text/html" : "text/plain";
177
+
178
  $header = "MIME-Version: 1.0\n" . "From: " . $fromname . " <" . $from . ">\n";
179
+ $header .= "Content-Type: ". $contenttype . "; charset=\"" . get_option( 'blog_charset' ) . "\"\n";
180
 
181
  // Your message
182
+ $splitstring = ( 1 == get_option( 'wp_email_capture_send_email_html' ) ) ? "<br/>" : "\n";
183
+ $htmlurl = ( 1 == get_option( 'wp_email_capture_send_email_html' ) ) ? '<p><a href="' . $siteurl .'?wp_email_confirm=1&wp_email_capture_passkey=' . $confirm_code . '">Click Here to Subscribe!</a><br/></p>' : $siteurl ."?wp_email_confirm=1&wp_email_capture_passkey=" . $confirm_code;
184
 
185
+ $message.= get_option( 'wp_email_capture_body' ) . $splitstring . $splitstring;
186
 
187
+ if ( $message == $splitstring . $splitstring ) {
188
  $message .= __( "Thank you for signing up for our newsletter, please click the link below to confirm your subscription", "wp-email-capture" ) . "\n\n";
189
  }
190
 
191
+ $message .= $htmlurl;
192
+ $message .= $splitstring . "----" . $splitstring;
193
+ $message .= __( "This is an automated message that is generated because somebody with the IP address of", 'wp-email-capture' )." " . $ip ." ".__( '(possibly you) on', 'wp-email-capture' )." ". $date ." ".__( 'filled out the form on the following page', 'wp-email-capture' )." " . $referrer . $splitstring;
194
  $message .= __( "If you are sure this isn't you, please ignore this message, you will not be sent another message.", 'wp-email-capture' );
195
  $message = str_replace( "%NAME%", $name, $message );
196
 
293
  $emaildataarray = array(
294
  'name' => $name,
295
  'email' => $email
296
+ );
297
 
298
  do_action( 'wp_email_capture_complete_before_redirect', $emaildataarray );
299
 
301
  echo "<meta http-equiv='refresh' content='0;". $fullreg ."'>";
302
  die();
303
 
304
+ /* } */
305
 
306
+ } else {
307
 
308
+ if ( strpos( $url, "?" ) === false ) { $extrastring = "?"; } else { $extrastring = "&"; }
 
 
 
309
 
310
+ $error = urlencode( __( 'Wrong confirmation code', 'wp-email-capture' ) );
311
+ $url = $url . $extrastring . "wp_email_capture_error=" . $error;
312
+
313
+ wp_redirect( $url );
314
+ die();
315
 
316
+ }
317
  }
 
318
 
319
 
320
 
328
  */
329
  function wp_email_capture_send_email_default( $to, $subject, $message, $header ) {
330
 
331
+ $disableheaders = get_option( 'wp_email_capture_disabled_headers' );
332
+
333
+ if ( $disableheaders ) {
334
+
335
+ $sendmail = wp_mail( $to, $subject, $message );
336
+
337
+ } else {
338
+
339
+ $sendmail = wp_mail( $to, $subject, $message, $header );
340
 
341
+ }
342
+
343
+ if ( !is_object( $phpmailer ) || !is_a( $phpmailer, 'PHPMailer' ) ) {
344
+ require_once ABSPATH . WPINC . '/class-phpmailer.php';
345
+ require_once ABSPATH . WPINC . '/class-smtp.php';
346
+ $phpmailer = new PHPMailer( true );
347
+ }
348
 
349
+ // Set SMTPDebug to true
350
+ /* $phpmailer->SMTPDebug = false;
351
+
352
+ echo "<br/><br/>To: " . $to;
353
+ echo "<br/>Subject " . $subject;
354
+ echo "<br/>Message " . $message;
355
+ echo "<br/>Header " . $header;
356
+
357
+ //$sendmail = wp_mail( $to, $subject, $message );
358
+
359
+ if ( $sendmail ) { $addedfield = "Email Sent!"; } else { $addedfield = "Email Not Sent"; }
360
+
361
+ // Start output buffering to grab smtp debugging output
362
+ /* ob_start();
363
+ add_filter( 'wp_mail_content_type', 'set_html_mail_content_type' );
364
+ // Send the test mail
365
+ //$result = wp_mail( $to, $subject, $message, $header );
366
+ remove_filter( 'wp_mail_content_type', 'set_html_mail_content_type' );
367
+ // Grab the smtp debugging output
368
+ $smtp_debug = ob_get_clean();
369
+
370
+ // Output the response
371
+ ?>
372
+ <div id="message" class="updated fade"><p><strong><?php _e( 'Test Message Sent', 'amgsessmtp' ); ?></strong></p>
373
+ <p><?php _e( 'The result was:', 'amgsessmtp' ); ?></p>
374
+ <pre><?php var_dump( $sendmail ); ?></pre>
375
+ <p><?php _e( 'The full debugging output is shown below:', 'amgsessmtp' ); ?></p>
376
+ <pre><?php var_dump( $phpmailer ); ?></pre>
377
+ <p><?php _e( 'The SMTP debugging output is shown below:', 'amgsessmtp' ); ?></p>
378
+ <pre><?php echo $smtp_debug ?></pre>
379
+ </div>
380
+ <?php
381
+
382
+ wp_die( "Sendmail is: " . $sendmail . "<br/>
383
+ Disableheaders is: " . $disableheaders); */
384
+
385
+ return $sendmail;
386
  }
readme.md CHANGED
@@ -6,9 +6,9 @@ Requires at least: 3.0
6
 
7
  Tested up to: 4.7
8
 
9
- Version: 3.2
10
 
11
- Stable tag: 3.2
12
 
13
  Contributors: rhyswynne
14
 
@@ -18,9 +18,9 @@ Double opt-in form for building your email list. Define landing pages to distrib
18
 
19
  Description
20
  ===========
21
- This creates a 2 field form (Name & Email) for capturing emails. Email is double opt in, and allows you to forward opt in to services such as ebooks or software. When you are ready to begin your email marketing campaign, simply export the list into your chosen email marketing software or service.
22
 
23
- Features:-
24
 
25
  * Widget Ready.
26
  * Uses Wordpress' internal wp_mail function for sending mail.
6
 
7
  Tested up to: 4.7
8
 
9
+ Version: 3.3
10
 
11
+ Stable tag: 3.3
12
 
13
  Contributors: rhyswynne
14
 
18
 
19
  Description
20
  ===========
21
+ This creates a 2 field form (Name & Email) for capturing emails. Email is double opt in, and allows you to forward opt in to services such as ebooks or software. When you are ready to begin your email marketing campaign, simply export the list into your chosen email marketing software or service. WP Email Capture now comes with a number of [integrations and extensions](https://www.wpemailcapture.com/downloads/?utm_source=description&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture), including [WP Email Capture Premium](https://www.wpemailcapture.com/premium?utm_source=description&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture) allows you to build multiple lists, track stats and have custom fields and templates
22
 
23
+ WP Email Capture Free Features:-
24
 
25
  * Widget Ready.
26
  * Uses Wordpress' internal wp_mail function for sending mail.
readme.txt CHANGED
@@ -1,18 +1,18 @@
1
- === WP Email Capture ===
2
  Tags: email, marketing, capture, form, affiliates, mailing lists, email marketing, widget ready
3
  Requires at least: 3.0
4
  Tested up to: 4.7
5
- Version: 3.2
6
- Stable tag: 3.2
7
  Contributors: rhyswynne
8
  Donate link: https://www.wpemailcapture.com/premium/?utm_source=donatelink&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture
9
 
10
  Double opt-in form for building your email list. Define landing pages to distribute your ebooks & software.
11
 
12
  == Description ==
13
- This creates a 2 field form (Name & Email) for capturing emails. Email is double opt in, and allows you to forward opt in to services such as ebooks or software. When you are ready to begin your email marketing campaign, simply export the list into your chosen email marketing software or service.
14
 
15
- Features:-
16
 
17
  * Widget Ready.
18
  * Uses Wordpress' internal wp_mail function for sending mail.
@@ -70,7 +70,13 @@ If you want to insert the form within a page, insert into any post or page the s
70
 
71
  You can also add a widget to any widget enabled area by going to Appearance > Widgets in the WordPress Administration.
72
 
73
- If you need more help, please read this guide on [how to set up WP Email Capture](http://wpemailcapture.com/2012/10/how-to-set-up-wp-email-capture-free/?utm_source=installation&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture)
 
 
 
 
 
 
74
 
75
  == Stylings ==
76
  To style your form, you need to add to your CSS file the following ID declarations. `wp_email_capture` is for sidebar & template widgets, `wp_email_capture_2` is for on page forms.
@@ -152,13 +158,12 @@ This plugin does use widgets, so probably yes :)
152
  = How do I include the name in my emails I send to people? =
153
  Wherever you put in %NAME% (spelt exactly like that, uppercase as well), it will be replaced with the name given by the user.
154
 
155
- == Bugs/Suggestions/Support ==
156
- Please report any bugs, support and suggestions to the [WP Email Capture Support Page](http://www.wpemailcapture.com/support/?utm_source=support&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture)
157
-
158
- == Donate ==
159
- To donate to this plugin, please visit the [WP Email Capture Donations Page](http://wpemailcapture.com/premium/?utm_source=donate&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture)
160
-
161
  == Change Log ==
 
 
 
 
 
162
  = 3.2 =
163
  * Correction in the German translation (props [Lars Kasper](http://larskasper.de/))
164
  * Added a wp_email_capture_extra_checks action, that will allow people to run checks on the name/email address.
1
+ === WordPress Email Marketing Plugin - WP Email Capture ===
2
  Tags: email, marketing, capture, form, affiliates, mailing lists, email marketing, widget ready
3
  Requires at least: 3.0
4
  Tested up to: 4.7
5
+ Version: 3.3
6
+ Stable tag: 3.3
7
  Contributors: rhyswynne
8
  Donate link: https://www.wpemailcapture.com/premium/?utm_source=donatelink&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture
9
 
10
  Double opt-in form for building your email list. Define landing pages to distribute your ebooks & software.
11
 
12
  == Description ==
13
+ This creates a 2 field form (Name & Email) for capturing emails. Email is double opt in, and allows you to forward opt in to services such as ebooks or software. When you are ready to begin your email marketing campaign, simply export the list into your chosen email marketing software or service. WP Email Capture now comes with a number of [integrations and extensions](https://www.wpemailcapture.com/downloads/?utm_source=description&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture), including [WP Email Capture Premium](https://www.wpemailcapture.com/premium?utm_source=description&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture) allows you to build multiple lists, track stats and have custom fields and templates
14
 
15
+ WP Email Capture Free Features:-
16
 
17
  * Widget Ready.
18
  * Uses Wordpress' internal wp_mail function for sending mail.
70
 
71
  You can also add a widget to any widget enabled area by going to Appearance > Widgets in the WordPress Administration.
72
 
73
+ If you need more help, please read this guide on [how to set up WP Email Capture](http://wpemailcapture.com/2012/10/how-to-set-up-wp-email-capture-free/?utm_source=installation&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture)
74
+
75
+ == Bugs/Suggestions/Support ==
76
+ Please report any bugs, support and suggestions to the [WP Email Capture Support Page](http://www.wpemailcapture.com/support/?utm_source=support&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture)
77
+
78
+ == Donate ==
79
+ To donate to this plugin, please visit the [WP Email Capture Donations Page](http://wpemailcapture.com/premium/?utm_source=donate&utm_medium=wordpressorgreadme&utm_campaign=wpemailcapture)
80
 
81
  == Stylings ==
82
  To style your form, you need to add to your CSS file the following ID declarations. `wp_email_capture` is for sidebar & template widgets, `wp_email_capture_2` is for on page forms.
158
  = How do I include the name in my emails I send to people? =
159
  Wherever you put in %NAME% (spelt exactly like that, uppercase as well), it will be replaced with the name given by the user.
160
 
 
 
 
 
 
 
161
  == Change Log ==
162
+ = 3.3 =
163
+ * Introduced the ability to have "HTML" enabled lists.
164
+ * Introduced the ability to send emails without headers. Useful for Amazon SES.
165
+ * Added a charset on export of CSV. (Props Ov3rfly)
166
+
167
  = 3.2 =
168
  * Correction in the German translation (props [Lars Kasper](http://larskasper.de/))
169
  * Added a wp_email_capture_extra_checks action, that will allow people to run checks on the name/email address.
wp-email-capture.php CHANGED
@@ -8,7 +8,7 @@ Plugin URI: https://www.wpemailcapture.com/?utm_source=plugin-link&utm_medium=pl
8
 
9
  Description: Captures email addresses for insertion into software such as <a href="http://wpemailcapture.com/recommends/aweber" title="Email Marketing">Aweber</a> or <a href="http://wpemailcapture.com/recommends/mailchimp/">Mailchimp</a>
10
 
11
- Version: 3.2
12
 
13
  Author: Winwar Media
14
 
@@ -26,7 +26,7 @@ define( 'WP_EMAIL_CAPTURE_PATH', dirname( __FILE__ ) );
26
  define( 'WP_EMAIL_CAPTURE_URL', plugins_url( '', __FILE__ ) );
27
  define( 'WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE', $wpdb->prefix . 'wp_email_capture_temp_members');
28
  define( 'WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE', $wpdb->prefix . 'wp_email_capture_registered_members');
29
- define( 'WP_EMAIL_CAPTURE_VERSION', '3.2' );
30
 
31
  require_once WP_EMAIL_CAPTURE_PATH . '/inc/core.php';
32
 
@@ -62,6 +62,8 @@ function wp_email_capture_plugins_loaded() {
62
  add_action( 'admin_enqueue_scripts', 'wp_email_capture_admin_scripts' );
63
  add_shortcode( 'wp_email_capture_form', 'wp_email_capture_form_process_atts' );
64
  add_filter( 'wp_email_capture_send_email', 'wp_email_capture_send_email_default', 10, 4 );
 
 
65
 
66
  // Running this on the same hook so it can be removed if need be.
67
  add_action( 'plugins_loaded', 'wp_email_capture_database_upgdrade', 50 );
8
 
9
  Description: Captures email addresses for insertion into software such as <a href="http://wpemailcapture.com/recommends/aweber" title="Email Marketing">Aweber</a> or <a href="http://wpemailcapture.com/recommends/mailchimp/">Mailchimp</a>
10
 
11
+ Version: 3.3
12
 
13
  Author: Winwar Media
14
 
26
  define( 'WP_EMAIL_CAPTURE_URL', plugins_url( '', __FILE__ ) );
27
  define( 'WP_EMAIL_CAPTURE_TEMP_MEMBERS_TABLE', $wpdb->prefix . 'wp_email_capture_temp_members');
28
  define( 'WP_EMAIL_CAPTURE_REGISTERED_MEMBERS_TABLE', $wpdb->prefix . 'wp_email_capture_registered_members');
29
+ define( 'WP_EMAIL_CAPTURE_VERSION', '3.3-beta' );
30
 
31
  require_once WP_EMAIL_CAPTURE_PATH . '/inc/core.php';
32
 
62
  add_action( 'admin_enqueue_scripts', 'wp_email_capture_admin_scripts' );
63
  add_shortcode( 'wp_email_capture_form', 'wp_email_capture_form_process_atts' );
64
  add_filter( 'wp_email_capture_send_email', 'wp_email_capture_send_email_default', 10, 4 );
65
+ add_action( 'wp_email_capture_set_wp_email_capture_email_settings', 'wp_email_capture_set_email_to_html', 10 );
66
+ add_action( 'wp_email_capture_set_normal_email_settings', 'wp_email_capture_set_email_to_plain', 10 );
67
 
68
  // Running this on the same hook so it can be removed if need be.
69
  add_action( 'plugins_loaded', 'wp_email_capture_database_upgdrade', 50 );