Plugin Directory

Changeset 2597607


Ignore:
Timestamp:
09/12/2021 03:54:51 PM (5 years ago)
Author:
hutanatu
Message:

ver 1.1.0

Location:
htp-smtp/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • htp-smtp/trunk/htp-smtp.php

    r2575192 r2597607  
    44 * Plugin URI:        https://hutanatu.com/plugin/htp-smtp/
    55 * Description:       HTP SMTP can help us to send emails via SMTP instead of the PHP mail() function and email logger built-in.
    6  * Version:           1.0.0
     6 * Version:           1.1.0
    77 * Author:            HuTaNaTu
    88 * Author URI:        https://hutanatu.com/
  • htp-smtp/trunk/inc/Admin_Menus.php

    r2575192 r2597607  
    182182            );
    183183        }
     184        if ( ! defined( 'HTP_SMTP_HTML' ) ) {
     185            add_settings_field(
     186                'html',
     187                __( 'HTML', 'htp-smtp' ),
     188                [ $this, 'render_fields' ],
     189                self::HTP_SMTP_PAGE,
     190                $section_id,
     191                [
     192                    'label_for' => 'html',
     193                    'type'      => 'checkbox',
     194                    'desc'      => __( 'Send this email in HTML or in plain text format.', 'htp-smtp' )
     195                ]
     196            );
     197        }
    184198        add_settings_field(
    185199            'delete_options',
     
    216230        $fields['username']       = sanitize_text_field( trim( $fields['username'] ) );
    217231        $fields['password']       = sanitize_text_field( trim( $fields['password'] ) );
     232        $fields['html']           = sanitize_text_field( trim( $fields['html'] ) );
    218233        $fields['delete_options'] = sanitize_text_field( trim( $fields['delete_options'] ) );
    219234
  • htp-smtp/trunk/inc/Main.php

    r2575192 r2597607  
    6464        echo '<input type="hidden" name="htp_smtp_test" value="test" />';
    6565        echo '<input type="hidden" name="htp_smtp_test_nonce" value="' . wp_create_nonce( 'htp_smtp_test' ) . '" />';
    66         submit_button();
     66        submit_button( __( 'Send Email', 'htp-smtp' ) );
    6767        echo '</form>';
    6868        echo '</div>';
     
    206206        $smtp_auth   = defined( 'HTP_SMTP_AUTH' ) ? HTP_SMTP_AUTH : self::$options['smtp_auth'];
    207207        $username    = defined( 'HTP_SMTP_USER' ) ? HTP_SMTP_USER : self::$options['username'];
     208        $html        = defined( 'HTP_SMTP_HTML' ) ? HTP_SMTP_HTML : self::$options['html'];
    208209        $password    = defined( 'HTP_SMTP_PASS' ) ? HTP_SMTP_PASS : self::$options['password'];
    209210        if (
     
    219220            $smtp_auth       = defined( 'HTP_SMTP_AUTH' ) ? HTP_SMTP_AUTH : $network_options['smtp_auth'];
    220221            $username        = defined( 'HTP_SMTP_USER' ) ? HTP_SMTP_USER : $network_options['username'];
     222            $html            = defined( 'HTP_SMTP_HTML' ) ? HTP_SMTP_HTML : $network_options['html'];
    221223            $password        = defined( 'HTP_SMTP_PASS' ) ? HTP_SMTP_PASS : $network_options['password'];
    222224
     
    235237        $phpmailer->Port       = $smtp_port;
    236238        $phpmailer->SMTPAuth   = $smtp_auth == 'yes';
     239        if ( $html === 'yes' ) {
     240            $phpmailer->ContentType = 'text/html';
     241        }
    237242
    238243        if ( $phpmailer->SMTPAuth ) {
  • htp-smtp/trunk/inc/Network_Admin_Menus.php

    r2575192 r2597607  
    164164                    'label_for' => 'password',
    165165                    'type'      => 'password',
     166                ]
     167            );
     168        }
     169        if ( ! defined( 'HTP_SMTP_HTML' ) ) {
     170            add_settings_field(
     171                'html',
     172                __( 'HTML', 'htp-smtp' ),
     173                [ $this, 'render_fields' ],
     174                self::HTP_SMTP_PAGE,
     175                $section_id,
     176                [
     177                    'label_for' => 'html',
     178                    'type'      => 'checkbox',
     179                    'desc'      => __( 'Send this email in HTML or in plain text format.', 'htp-smtp' )
    166180                ]
    167181            );
     
    211225            $options['username']       = sanitize_text_field( trim( $_POST['username'] ) );
    212226            $options['password']       = sanitize_text_field( trim( $_POST['password'] ) );
     227            $options['html']           = sanitize_text_field( trim( $_POST['html'] ) );
    213228            $options['delete_options'] = sanitize_text_field( trim( $_POST['delete_options'] ) );
    214229
  • htp-smtp/trunk/readme.txt

    r2575194 r2597607  
    33License: GPLv3
    44Tested up to: 5.8
    5 Stable tag: 1.0.0
     5Stable tag: 1.1.0
    66
    77HTP SMTP can help us to send emails via SMTP instead of the PHP mail() function.
Note: See TracChangeset for help on using the changeset viewer.