diff --git a/wp-content/plugins/wp-smtp/img/163.png b/wp-content/plugins/wp-smtp/img/163.png new file mode 100644 index 0000000..28e425b Binary files /dev/null and b/wp-content/plugins/wp-smtp/img/163.png differ diff --git a/wp-content/plugins/wp-smtp/img/alipay_donate_email.jpg b/wp-content/plugins/wp-smtp/img/alipay_donate_email.jpg new file mode 100644 index 0000000..a894b3e Binary files /dev/null and b/wp-content/plugins/wp-smtp/img/alipay_donate_email.jpg differ diff --git a/wp-content/plugins/wp-smtp/img/blq_32_32.jpg b/wp-content/plugins/wp-smtp/img/blq_32_32.jpg new file mode 100644 index 0000000..a566005 Binary files /dev/null and b/wp-content/plugins/wp-smtp/img/blq_32_32.jpg differ diff --git a/wp-content/plugins/wp-smtp/img/gmail.png b/wp-content/plugins/wp-smtp/img/gmail.png new file mode 100644 index 0000000..b228da1 Binary files /dev/null and b/wp-content/plugins/wp-smtp/img/gmail.png differ diff --git a/wp-content/plugins/wp-smtp/img/microsoft.png b/wp-content/plugins/wp-smtp/img/microsoft.png new file mode 100644 index 0000000..b4dbce2 Binary files /dev/null and b/wp-content/plugins/wp-smtp/img/microsoft.png differ diff --git a/wp-content/plugins/wp-smtp/img/paypal_32_32.jpg b/wp-content/plugins/wp-smtp/img/paypal_32_32.jpg new file mode 100644 index 0000000..e5a85fc Binary files /dev/null and b/wp-content/plugins/wp-smtp/img/paypal_32_32.jpg differ diff --git a/wp-content/plugins/wp-smtp/img/paypal_donate_email.jpg b/wp-content/plugins/wp-smtp/img/paypal_donate_email.jpg new file mode 100644 index 0000000..147e484 Binary files /dev/null and b/wp-content/plugins/wp-smtp/img/paypal_donate_email.jpg differ diff --git a/wp-content/plugins/wp-smtp/img/qq.png b/wp-content/plugins/wp-smtp/img/qq.png new file mode 100644 index 0000000..a8bb4c2 Binary files /dev/null and b/wp-content/plugins/wp-smtp/img/qq.png differ diff --git a/wp-content/plugins/wp-smtp/img/yahoo.png b/wp-content/plugins/wp-smtp/img/yahoo.png new file mode 100644 index 0000000..6cdd122 Binary files /dev/null and b/wp-content/plugins/wp-smtp/img/yahoo.png differ diff --git a/wp-content/plugins/wp-smtp/lang/wp-smtp-zh_CN.mo b/wp-content/plugins/wp-smtp/lang/wp-smtp-zh_CN.mo new file mode 100644 index 0000000..a103a49 Binary files /dev/null and b/wp-content/plugins/wp-smtp/lang/wp-smtp-zh_CN.mo differ diff --git a/wp-content/plugins/wp-smtp/lang/wp-smtp-zh_CN.po b/wp-content/plugins/wp-smtp/lang/wp-smtp-zh_CN.po new file mode 100644 index 0000000..00de34d --- /dev/null +++ b/wp-content/plugins/wp-smtp/lang/wp-smtp-zh_CN.po @@ -0,0 +1,106 @@ +msgid "" +msgstr "" +"Project-Id-Version: WP-SMTP Languages\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-10-07 00:39+0800\n" +"PO-Revision-Date: 2013-10-07 00:39+0800\n" +"Last-Translator: 夜光 \n" +"Language-Team: 玻璃泉BoLiQuan.COM \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;_e\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-Language: English\n" +"X-Poedit-Country: CHINA\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-SearchPath-0: D:\\xampp\\htdocs\\wordpress\\wp-content\\plugins\\wp-smtp\n" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp-smtp.php:66 +msgid "Settings" +msgstr "设置" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:21 +msgid "The field \"From\" must be a valid email address!" +msgstr "“发件人地址”必须是一个有效的电子邮件地址!" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:24 +msgid "The field \"SMTP Host\" can not be left blank!" +msgstr "“SMTP服务器地址”不能为空!" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:27 +msgid "Options saved." +msgstr "设置已保存。" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:47 +msgid "Message sent!" +msgstr "邮件已发送!" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:54 +msgid "Some errors occurred!" +msgstr "发生了一些错误!" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:57 +msgid "The fields \"To\" \"Subject\" \"Message\" can not be left blank when testing!" +msgstr "测试时“收件地址”“邮件标题”“邮件正文”均不能为空!" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:80 +msgid "From" +msgstr "发件人地址" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:90 +msgid "From Name" +msgstr "发件人昵称" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:100 +msgid "SMTP Host" +msgstr "SMTP服务器地址" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:110 +msgid "SMTP Secure" +msgstr "SMTP加密方式" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:131 +msgid "SMTP Port" +msgstr "SMTP端口" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:141 +msgid "SMTP Authentication" +msgstr "SMTP认证" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:157 +msgid "Username" +msgstr "认证用户名 (完整邮件地址)" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:167 +msgid "Password" +msgstr "认证密码" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:177 +msgid "Delete Options" +msgstr "禁用时自动删除设置" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:182 +msgid "Delete options while deactivate this plugin." +msgstr "当禁用此插件时自动删除此插件的设置数据." + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:190 +msgid "Save Changes" +msgstr "保存更改" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:199 +msgid "To:" +msgstr "收件地址:" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:209 +msgid "Subject:" +msgstr "邮件标题:" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:219 +msgid "Message:" +msgstr "邮件正文:" + +#: D:\xampp\htdocs\wordpress\wp-content\plugins\wp-smtp/wp_smtp_admin.php:230 +msgid "Send Test" +msgstr "发送测试" + diff --git a/wp-content/plugins/wp-smtp/readme.txt b/wp-content/plugins/wp-smtp/readme.txt new file mode 100644 index 0000000..643b511 --- /dev/null +++ b/wp-content/plugins/wp-smtp/readme.txt @@ -0,0 +1,109 @@ +=== WP SMTP === +Contributors: yehudah +Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=yehuda@myinbox.in&item_name=Donation+for+WPSMTP +Tags: wp smtp,smtp,mail,email,phpmailer,mailer,wp mail,gmail,yahoo,mail smtp,ssl,tls +License: GPLv2 +Requires at least: 2.7 +Tested up to: 5.2 +Stable tag: 1.1.10 + +WP SMTP can help us to send emails via SMTP instead of the PHP mail() function. + +== Description == + +WP SMTP can help us to send emails via SMTP instead of the PHP mail() function. +It adds a settings page to "Dashboard"->"Settings"->"WP SMTP" where you can configure the email settings. +There are some examples on the settings page, you can click the corresponding icon to view (such as "Gmail""Yahoo!""Microsoft""163""QQ"). +If the field "From" was not a valid email address, or the field "SMTP Host" was left blank, it will not reconfigure the wp_mail() function. + += Do you want more advanced SMTP mailer? = + +* Built-in **importer for WP SMTP settings**. +* Universal SMTP for every service. +* SMTP ports are blocked? API support - A method for sending emails via HTTP for Gmail, Sendgrid, Mailgun, and Mandrill. +* Credentials can be configured inside wp-config.php insted of the DB. +* Built-in mail logger with the option to resend and filter. +* Built-in alert function when emails are faling, you can get notified by Email, Slack or pushover. +* Ports checker for any blocking issue. + +**Check Post SMTP:** +[https://wordpress.org/plugins/post-smtp/](https://wordpress.org/plugins/post-smtp/) + += CREDITS = + +WP SMTP plugin was originally created by BoLiQuan. It is now owned and maintained by Yehuda Hassine. + += Usage = + +1. Download and extract `wp-smtp.zip` to `wp-content/plugins/` +2. Activate the plugin through the 'Plugins' menu in WordPress. +3. "Dashboard"->"Settings"->"WP SMTP" +4. There are some examples on the settings page, you can click the corresponding icon to view.(such as "Gmail""Yahoo!""Microsoft""163""QQ") +5. For more information of this plugin, please visit: [Plugin Homepage](https://wpsmtpmail.com/ "WP SMTP"). + +== Installation == + +1. Download and extract `wp-smtp.zip` to `wp-content/plugins/` +2. Activate the plugin through the 'Plugins' menu in WordPress. +3. "Dashboard"->"Settings"->"WP SMTP" +4. There are some examples on the settings page, you can click the corresponding icon to view.(such as "Gmail""Yahoo!""Microsoft""163""QQ") +5. For more information of this plugin, please visit: [Plugin Homepage](https://wpsmtpmail.com/ "WP SMTP"). + +== Changelog == + += 1.1.10 = + +New maintainer - yehudah +https://wpsmtpmail.com/v1-1-10-wp-smtp-is-back/ + +* Code structure and organize. +* Credentials can now be configured inside wp-config.php + += 1.1.9 = + +* Some optimization + += 1.1.7 = + +* Using a nonce to increase security. + += 1.1.6 = + +* Add Yahoo! example +* Some optimization + += 1.1.5 = + +* Some optimization + += 1.1.4 = + +* If the field "From" was not a valid email address, or the field "Host" was left blank, it will not reconfigure the wp_mail() function. +* Add some reminders. + += 1.1.3 = + +* If "SMTP Authentication" was set to no, the values "Username""Password" are ignored. + += 1.1.2 = + +* First release. + + +== Screenshots == + +1. "Gmail.com" settings +2. "Yahoo.com" settings +3. "Live.com" settings +4. "163.com" settings +5. "QQ.com" settings + + +== Frequently Asked Questions == + +You can sumbit it in https://wordpress.org/support/plugin/wp-smtp, if It's urgent like a bug submit it here: https://wpsmtpmail.com/contact/ + + +== Upgrade Notice == + +Please visit http://boliquan.com/wp-smtp/ diff --git a/wp-content/plugins/wp-smtp/screenshot-1.png b/wp-content/plugins/wp-smtp/screenshot-1.png new file mode 100644 index 0000000..340e57f Binary files /dev/null and b/wp-content/plugins/wp-smtp/screenshot-1.png differ diff --git a/wp-content/plugins/wp-smtp/screenshot-2.png b/wp-content/plugins/wp-smtp/screenshot-2.png new file mode 100644 index 0000000..45170c0 Binary files /dev/null and b/wp-content/plugins/wp-smtp/screenshot-2.png differ diff --git a/wp-content/plugins/wp-smtp/screenshot-3.png b/wp-content/plugins/wp-smtp/screenshot-3.png new file mode 100644 index 0000000..cedf3d0 Binary files /dev/null and b/wp-content/plugins/wp-smtp/screenshot-3.png differ diff --git a/wp-content/plugins/wp-smtp/screenshot-4.png b/wp-content/plugins/wp-smtp/screenshot-4.png new file mode 100644 index 0000000..f3dafe7 Binary files /dev/null and b/wp-content/plugins/wp-smtp/screenshot-4.png differ diff --git a/wp-content/plugins/wp-smtp/screenshot-5.png b/wp-content/plugins/wp-smtp/screenshot-5.png new file mode 100644 index 0000000..cf68fb1 Binary files /dev/null and b/wp-content/plugins/wp-smtp/screenshot-5.png differ diff --git a/wp-content/plugins/wp-smtp/wp-smtp.php b/wp-content/plugins/wp-smtp/wp-smtp.php new file mode 100644 index 0000000..2e2f210 --- /dev/null +++ b/wp-content/plugins/wp-smtp/wp-smtp.php @@ -0,0 +1,113 @@ +setup_vars(); + $this->hooks(); + } + + public function setup_vars(){ + $this->wsOptions = get_option( 'wp_smtp_options' ); + } + + public function hooks() { + register_activation_hook( __FILE__ , array( $this,'wp_smtp_activate' ) ); + register_deactivation_hook( __FILE__, array( $this, 'wp_smtp_deactivate' ) ); + + add_filter( 'plugin_action_links', array( $this, 'wp_smtp_settings_link' ), 10, 2 ); + add_action( 'init', array( $this,'load_textdomain' ) ); + add_action( 'phpmailer_init', array( $this,'wp_smtp' ) ); + add_action( 'wp_mail_failed', array( $this, 'catch_phpmailer_error' ) ); + add_action( 'admin_menu', array( $this, 'wp_smtp_admin' ) ); + } + + function wp_smtp_activate(){ + $wsOptions = array(); + $wsOptions["from"] = ""; + $wsOptions["fromname"] = ""; + $wsOptions["host"] = ""; + $wsOptions["smtpsecure"] = ""; + $wsOptions["port"] = ""; + $wsOptions["smtpauth"] = "yes"; + $wsOptions["username"] = ""; + $wsOptions["password"] = ""; + $wsOptions["deactivate"] = ""; + + add_option( 'wp_smtp_options', $wsOptions ); + } + + function wp_smtp_deactivate() { + if( $this->wsOptions['deactivate'] == 'yes' ) { + delete_option( 'wp_smtp_options' ); + } + } + + function load_textdomain() { + load_plugin_textdomain( 'wp-smtp', false, dirname( plugin_basename( __FILE__ ) ) . '/lang' ); + } + + function wp_smtp( $phpmailer ) { + + if( ! is_email($this->wsOptions["from"] ) || empty( $this->wsOptions["host"] ) ) { + return; + } + + $phpmailer->Mailer = "smtp"; + $phpmailer->From = $this->wsOptions["from"]; + $phpmailer->FromName = $this->wsOptions["fromname"]; + $phpmailer->Sender = $phpmailer->From; //Return-Path + $phpmailer->AddReplyTo($phpmailer->From,$phpmailer->FromName); //Reply-To + $phpmailer->Host = $this->wsOptions["host"]; + $phpmailer->SMTPSecure = $this->wsOptions["smtpsecure"]; + $phpmailer->Port = $this->wsOptions["port"]; + $phpmailer->SMTPAuth = ($this->wsOptions["smtpauth"]=="yes") ? TRUE : FALSE; + + if( $phpmailer->SMTPAuth ){ + $phpmailer->Username = $this->wsOptions["username"]; + $phpmailer->Password = $this->wsOptions["password"]; + } + } + + function catch_phpmailer_error( $error ) { + $this->phpmailer_error = $error; + } + + function wp_smtp_settings_link($action_links,$plugin_file) { + if( $plugin_file == plugin_basename( __FILE__ ) ) { + $ws_settings_link = '' . __("Settings") . ''; + array_unshift($action_links,$ws_settings_link); + } + + return $action_links; + } + + function wp_smtp_admin(){ + add_options_page('WP SMTP Options', 'WP SMTP','manage_options', __FILE__, array( $this, 'wp_smtp_page') ); + } + + function wp_smtp_page(){ + require_once __DIR__ . '/wp_smtp_admin.php'; + } +} + +new WP_SMTP(); +?> \ No newline at end of file diff --git a/wp-content/plugins/wp-smtp/wp_smtp_admin.php b/wp-content/plugins/wp-smtp/wp_smtp_admin.php new file mode 100644 index 0000000..b821f6f --- /dev/null +++ b/wp-content/plugins/wp-smtp/wp_smtp_admin.php @@ -0,0 +1,259 @@ +wsOptions = array(); + $this->wsOptions["from"] = sanitize_email( trim( $_POST['wp_smtp_from'] ) ); + $this->wsOptions["fromname"] = sanitize_text_field( trim( $_POST['wp_smtp_fromname'] ) ); + $this->wsOptions["host"] = sanitize_text_field( trim( $_POST['wp_smtp_host'] ) ); + $this->wsOptions["smtpsecure"] = sanitize_text_field( trim( $_POST['wp_smtp_smtpsecure'] ) ); + $this->wsOptions["port"] = is_numeric( trim( $_POST['wp_smtp_port'] ) ) ? trim( $_POST['wp_smtp_port'] ) : ''; + $this->wsOptions["smtpauth"] = sanitize_text_field( trim( $_POST['wp_smtp_smtpauth'] ) ); + $this->wsOptions["username"] = defined( 'WP_SMTP_USER' ) ? WP_SMTP_USER : sanitize_text_field( trim( $_POST['wp_smtp_username'] ) ); + $this->wsOptions["password"] = defined( 'WP_SMTP_PASS' ) ? WP_SMTP_PASS : sanitize_text_field( trim( $_POST['wp_smtp_password'] ) ); + $this->wsOptions["deactivate"] = ( isset($_POST['wp_smtp_deactivate'] ) ) ? sanitize_text_field( trim( $_POST['wp_smtp_deactivate'] ) ) : ''; + + update_option("wp_smtp_options", $this->wsOptions); + + if ( ! is_email($this->wsOptions["from"] ) ) { + echo '

' . __("The field \"From\" must be a valid email address!", "WP-SMTP") . '

'; + } elseif (empty($this->wsOptions["host"])) { + echo '

' . __("The field \"SMTP Host\" can not be left blank!", "WP-SMTP") . '

'; + } else { + echo '

' . __("Options saved.", "WP-SMTP") . '

'; + } +} + +// Catch the test form +if ( isset( $_POST['wp_smtp_test'] ) && isset( $_POST['wp_smtp_nonce_test'] ) ) { + + if ( ! wp_verify_nonce( trim( $_POST['wp_smtp_nonce_test'] ), 'my_ws_nonce' ) ) { + wp_die('Security check not passed!'); + } + + $to = sanitize_text_field( trim( $_POST['wp_smtp_to'] ) ); + $subject = sanitize_text_field( trim( $_POST['wp_smtp_subject'] ) ); + $message = sanitize_textarea_field(trim( $_POST['wp_smtp_message'] ) ); + $status = false; + $class = 'error'; + + if ( ! empty( $to ) && is_email( $to ) && ! empty( $subject ) && ! empty( $message ) ) { + try { + $result = wp_mail( $to, $subject, $message ); + } catch (Exception $e) { + $status = $e->getMessage(); + } + } else { + $status = __( 'Some of the test fields are empty or an invalid email supplied', 'wp-smtp' ); + } + + if ( ! $status ) { + if ( $result === true ) { + $status = __( 'Message sent!', 'wp-smtp' ); + $class = 'success'; + } else { + $status = $this->phpmailer_error->get_error_message(); + } + } + + echo '

' . $status . '

'; +} + +$ws_nonce = wp_create_nonce('my_ws_nonce'); +?> +
+ +

+ WP SMTP + + Gmail + Yahoo! + Microsoft + 163 + QQ + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + +
+ + + +   + +   + +
+ + + +
+ + + +   + +
+ + + +
+ + + +
+ + + +
+ +

+ + + +

+ +
+ +
+

+ + + + + + + + + + + + + +
+ + + +
+ + + +
+ + + +
+

+ + + +

+
\ No newline at end of file