🔥 HOT: Changeset/ - Full Gallery 2025

Changeset 3386125


Ignore:
Timestamp:
10/28/2025 11:06:36 PM (2 months ago)
Author:
naa986
Message:

.v1.1.23 commit

Location:
smtp-mailer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smtp-mailer/trunk/main.php

    r3360188 r3386125  
    22/*
    33Plugin Name: SMTP Mailer
    4 Version: 1.1.22
     4Version: 1.1.23
    55Requires at least: 6.8
    66Plugin URI: https://wphowto.net/smtp-mailer-plugin-for-wordpress-1482
     
    1818class SMTP_MAILER {
    1919   
    20     var $plugin_version = '1.1.21';
     20    var $plugin_version = '1.1.23';
    2121    var $phpmailer_version = '6.9.3';
    2222    var $plugin_url;
     
    298298                $from_name = sanitize_text_field(stripslashes($_POST['from_name']));
    299299            }
     300            $force_from_name = '';
     301            if(isset($_POST['force_from_name']) && !empty($_POST['force_from_name'])){
     302                $force_from_name = sanitize_text_field($_POST['force_from_name']);
     303            }
     304            $force_from_email = '';
     305            if(isset($_POST['force_from_email']) && !empty($_POST['force_from_email'])){
     306                $force_from_email = sanitize_text_field($_POST['force_from_email']);
     307            }
    300308            $force_from_address = '';
    301309            if(isset($_POST['force_from_address']) && !empty($_POST['force_from_address'])){
     
    317325            $options['from_email'] = $from_email;
    318326            $options['from_name'] = $from_name;
     327            $options['force_from_name'] = $force_from_name;
     328            $options['force_from_email'] = $force_from_email;
    319329            $options['force_from_address'] = $force_from_address;
    320330            $options['disable_ssl_verification'] = $disable_ssl_verification;
     
    337347        if(!is_array($options)){
    338348            $options = smtp_mailer_get_empty_options_array();
     349        }
     350       
     351        // Avoid warning notice since this option was added later
     352        if(!isset($options['force_from_name'])){
     353            $options['force_from_name'] = '';
     354        }
     355       
     356        // Avoid warning notice since this option was added later
     357        if(!isset($options['force_from_email'])){
     358            $options['force_from_email'] = '';
    339359        }
    340360       
     
    415435                        <td><input name="from_name" type="text" id="from_name" value="<?php echo esc_attr($options['from_name']); ?>" class="regular-text code">
    416436                            <p class="description"><?php _e('The name which will be used as the From Name if it is not supplied to the mail function.', 'smtp-mailer');?></p></td>
     437                    </tr>
     438                   
     439                    <tr valign="top">
     440                        <th scope="row"><label for="force_from_name"><?php _e('Force From Name', 'smtp-mailer');?></label></th>
     441                        <td><input name="force_from_name" type="checkbox" id="force_from_name" <?php checked($options['force_from_name'], 1); ?> value="1">
     442                            <p class="description"><?php _e('The From name in the settings will be set for all outgoing email messages.', 'smtp-mailer');?></p></td>
     443                    </tr>
     444                   
     445                    <tr valign="top">
     446                        <th scope="row"><label for="force_from_email"><?php _e('Force From Email', 'smtp-mailer');?></label></th>
     447                        <td><input name="force_from_email" type="checkbox" id="force_from_email" <?php checked($options['force_from_email'], 1); ?> value="1">
     448                            <p class="description"><?php _e('The From email in the settings will be set for all outgoing email messages.', 'smtp-mailer');?></p></td>
    417449                    </tr>
    418450                   
     
    513545    $options['from_email'] = '';
    514546    $options['from_name'] = '';
     547    $options['force_from_name'] = '';
     548    $options['force_from_email'] = '';
    515549    $options['force_from_address'] = '';
    516550    $options['disable_ssl_verification'] = '';
     
    754788     */
    755789    $from_name = apply_filters( 'wp_mail_from_name', $from_name );
     790    //force from name if checked
     791    if(isset($options['force_from_name']) && !empty($options['force_from_name'])){
     792        $from_name = $options['from_name'];
     793    }
     794    //force from email if checked
     795    if(isset($options['force_from_email']) && !empty($options['force_from_email'])){
     796        $from_email = $options['from_email'];
     797    }
    756798    //force from address if checked
    757799    if(isset($options['force_from_address']) && !empty($options['force_from_address'])){
  • smtp-mailer/trunk/readme.txt

    r3360188 r3386125  
    55Requires at least: 6.8
    66Tested up to: 6.8
    7 Stable tag: 1.1.22
     7Stable tag: 1.1.23
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    2828* **Type of Encryption**: The encryption to be used when sending an email (TLS/SSL/No Encryption. TLS is recommended).
    2929* **SMTP Port**: The port to be used when sending an email (587/465/25). If you choose TLS the port should be set to 587. For SSL use port 465 instead.
    30 * **From Email Address**: The email address to be used as the From Address when sending an email.
    31 * **From Name**: The name to be used as the From Name when sending an email.
     30* **From Email Address**: The email address to be used as the From Email when sending a test email.
     31* **From Name**: The name to be used as the From Name when sending a test email.
     32* **Force From Name**: The From name in the settings is set for all outgoing email messages.
     33* **Force From Email**: The From email in the settings is set for all outgoing email messages.
     34* **Force From Address**: The From address in the settings is set for all outgoing email messages.
     35* **Disable SSL Certificate Verification**: As of PHP 5.6 a warning/error is shown if the SSL certificate on the server is not properly configured. This option lets you disable that behaviour.