Changeset 1278277
- Timestamp:
- 11/03/2015 04:54:51 AM (10 years ago)
- Location:
- easy-wp-smtp/trunk
- Files:
-
- 2 edited
-
easy-wp-smtp.php (modified) (7 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
easy-wp-smtp/trunk/easy-wp-smtp.php
r1242043 r1278277 2 2 /* 3 3 Plugin Name: Easy WP SMTP 4 Version: 1.2. 04 Version: 1.2.1 5 5 Plugin URI: https://wp-ecommerce.net/easy-wordpress-smtp-send-emails-from-your-wordpress-site-using-a-smtp-server-2197 6 6 Author: wpecommerce … … 121 121 */ 122 122 if ( ! function_exists ( 'swpsmtp_init_smtp' ) ) { 123 function swpsmtp_init_smtp( $phpmailer ) { 123 function swpsmtp_init_smtp( $phpmailer ) { 124 //check if SMTP credentials have been configured. 125 if(!swpsmtp_credentials_configured()){ 126 return; 127 } 124 128 $swpsmtp_options = get_option( 'swpsmtp_options' ); 125 129 /* Set the mailer type as per config above, this overrides the already called isMail method */ … … 145 149 $phpmailer->Password = swpsmtp_get_password(); 146 150 } 151 //PHPMailer 5.2.10 introduced this option. However, this might cause issues if the server is advertising TLS with an invalid certificate. 152 $phpmailer->SMTPAutoTLS = false; 147 153 } 148 154 } … … 339 345 if ( ! function_exists( 'swpsmtp_test_mail' ) ) { 340 346 function swpsmtp_test_mail( $to_email, $subject, $message ) { 347 if(!swpsmtp_credentials_configured()){ 348 return; 349 } 341 350 $errors = ''; 342 351 … … 365 374 $mail->SMTPSecure = $swpsmtp_options['smtp_settings']['type_encryption']; 366 375 } 376 377 /* PHPMailer 5.2.10 introduced this option. However, this might cause issues if the server is advertising TLS with an invalid certificate. */ 378 $mail->SMTPAutoTLS = false; 367 379 368 380 /* Set the other options */ … … 430 442 } 431 443 444 if ( ! function_exists( 'swpsmtp_admin_notice' ) ) { 445 function swpsmtp_admin_notice() { 446 if(!swpsmtp_credentials_configured()){ 447 ?> 448 <div class="error"> 449 <p><?php _e( 'Please configure your SMTP credentials in the settings in order to send email using Easy WP SMTP plugin.', 'easy-wp-smtp' ); ?></p> 450 </div> 451 <?php 452 } 453 } 454 } 455 456 if ( ! function_exists( 'swpsmtp_credentials_configured' ) ) { 457 function swpsmtp_credentials_configured() { 458 $swpsmtp_options = get_option( 'swpsmtp_options' ); 459 $credentials_configured = true; 460 if(!isset($swpsmtp_options['from_email_field']) || empty($swpsmtp_options['from_email_field'])){ 461 $credentials_configured = false; 462 } 463 if(!isset($swpsmtp_options['from_name_field']) || empty($swpsmtp_options['from_name_field'])){ 464 $credentials_configured = false;; 465 } 466 return $credentials_configured; 467 } 468 } 469 432 470 433 471 /** … … 444 482 add_action( 'admin_init', 'swpsmtp_admin_init' ); 445 483 add_action( 'admin_enqueue_scripts', 'swpsmtp_admin_head' ); 484 add_action( 'admin_notices', 'swpsmtp_admin_notice' ); 446 485 447 486 register_uninstall_hook( plugin_basename( __FILE__ ), 'swpsmtp_send_uninstall' ); -
easy-wp-smtp/trunk/readme.txt
r1242043 r1278277 3 3 Donate link: https://wp-ecommerce.net/easy-wordpress-smtp-send-emails-from-your-wordpress-site-using-a-smtp-server-2197 4 4 Tags: mail, wordpress smtp, phpmailer, smtp, wp_mail, email, gmail, outgoing mail, privacy, security, sendmail, ssl, tls, wp-phpmailer, mail smtp, wp smtp 5 Requires at least: 3.05 Requires at least: 4.3 6 6 Tested up to: 4.3 7 Stable tag: 1.2. 07 Stable tag: 1.2.1 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 75 75 76 76 == Changelog == 77 78 = 1.2.1 = 79 80 * Set SMTPAutoTLS to false by default as it might cause issues if the server is advertising TLS with an invalid certificate. 81 * Display an error message near the top of admin pages if SMTP credentials are not configured. 77 82 78 83 = 1.2.0 =
Note: See TracChangeset
for help on using the changeset viewer.