Changeset 1360411
- Timestamp:
- 02/29/2016 01:28:53 AM (10 years ago)
- Location:
- sparkpost
- Files:
-
- 5 deleted
- 5 edited
-
assets/banner-772x250.png (deleted)
-
assets/icon-128x128.png (deleted)
-
tags/1.1.2 (deleted)
-
tags/1.1.3 (deleted)
-
tags/1.1.4 (deleted)
-
trunk/mailer.class.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/sparkpost.class.php (modified) (1 diff)
-
trunk/widget.class.php (modified) (6 diffs)
-
trunk/wordpress-sparkpost.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
sparkpost/trunk/mailer.class.php
r1326652 r1360411 14 14 { 15 15 add_action('phpmailer_init', array($this, 'configure_phpmailer'), 2); 16 add_filter('wp_mail_from', array($this, 'set_from_email')); 17 add_filter('wp_mail_from_name', array($this, 'set_from_name')); 16 18 } 17 19 … … 25 27 $phpmailer->isSMTP(); 26 28 $phpmailer->SMTPSecure = 'tls'; 27 $phpmailer->Port = 587;29 $phpmailer->Port = !empty($options['port']) ? intval($options['port']) : 587; 28 30 $phpmailer->Host = 'smtp.sparkpostmail.com'; 29 $phpmailer->setFrom($options['from_email'], $options['from_name']);30 31 $phpmailer->AddReplyTo($options['from_email'], $options['from_name']); 31 32 … … 34 35 $phpmailer->Password = $options['password']; 35 36 } 37 38 public function set_from_name() { 39 $options = get_option('sp_settings'); 40 return $options['from_name']; 41 } 42 43 public function set_from_email() { 44 $options = get_option('sp_settings'); 45 return $options['from_email']; 46 } 36 47 } -
sparkpost/trunk/readme.txt
r1326844 r1360411 3 3 Tags: sparkpost, smtp, wp_mail, mail, email 4 4 Requires at least: 4.0 5 Tested up to: 4.4 6 Stable tag: 1.1. 45 Tested up to: 4.4.2 6 Stable tag: 1.1.5 7 7 License: GPLv2 or later 8 8 … … 62 62 63 63 == Changelog == 64 = 1.1.5 = 65 - Support alternate port 66 - Use filter to set sender info 67 - Clearer settings panel 68 64 69 = 1.1.4 = 65 Minor settings update 70 Update copy 66 71 67 72 = 1.1.3 = -
sparkpost/trunk/sparkpost.class.php
r1326652 r1360411 25 25 'from_name' => '', 26 26 'from_email' => '', 27 'port' => 587, 27 28 'enable_sparkpost' => 0 28 29 ); -
sparkpost/trunk/widget.class.php
r1326840 r1360411 89 89 settings_fields("sp_settings_group"); 90 90 do_settings_sections("sp-options"); 91 do_settings_sections("sp-advanced"); 91 92 submit_button(); 92 93 ?> … … 119 120 add_settings_field("from_name", "From name*", array($this, 'render_from_name_field'), "sp-options", "general"); 120 121 add_settings_field("from_email", "From email*", array($this, 'render_from_email_field'), "sp-options", "general"); 122 123 add_settings_field("username", "Username*", array($this, 'render_username_field'), "sp-options", "general"); 121 124 add_settings_field("password", "Password*", array($this, 'render_password_field'), "sp-options", "general"); 125 126 add_settings_section('advanced', 'Advanced', null, "sp-advanced"); 127 add_settings_field("port", "Port", array($this, 'render_port_field'), "sp-advanced", "advanced"); 122 128 123 129 add_settings_section('test_email', '', null, 'sp-test-email'); … … 149 155 } 150 156 151 if (isset($input['enable_sparkpost'])) {157 if (isset($input['enable_sparkpost'])) { 152 158 $new_input['enable_sparkpost'] = 1; 153 159 } else { … … 160 166 } 161 167 168 $new_input['port'] = in_array(intval(esc_attr($input['port'])), array(587, 2525)) ? intval(esc_attr($input['port'])) : 587; 169 162 170 return $new_input; 163 171 } … … 168 176 '<label><input type="checkbox" id="enable_sparkpost" name="sp_settings[enable_sparkpost]" value="1" %s />Send email using SparkPost</label>', $this->options['enable_sparkpost'] ? 'checked' : '' 169 177 ); 178 } 179 180 public function render_username_field() 181 { 182 echo '<input type="text" id="username" name="sp_settings[username]" class="regular-text" value="SMTP_Injection" readonly />'; 170 183 } 171 184 … … 194 207 } 195 208 209 public function render_port_field() 210 { 211 $selected_port = esc_attr($this->options['port']); 212 213 echo '<select name="sp_settings[port]"> 214 <option value="587" ' . (($selected_port == 587) ? 'selected' : '') . '>587 (Default)</option> 215 <option value="2525" ' .(($selected_port == 2525) ? 'selected' : '') .'>2525</option> 216 </select><br/><small>Change only if default port is not working!</small>'; 217 } 218 196 219 public function render_to_email_field() 197 220 { -
sparkpost/trunk/wordpress-sparkpost.php
r1326844 r1360411 7 7 Plugin URI: http://sparkpost.com/ 8 8 Description: Send all your email from Wordpress through SparkPost, the world's most advanced email delivery service. 9 Version: 1.1. 410 Author: The HungryCoder11 Author URI: http:// thehungrycoder.com9 Version: 1.1.5 10 Author: SparkPost 11 Author URI: http://sparkpost.com 12 12 License: GPLv2 or later 13 13 Text Domain: wpsp
Note: See TracChangeset
for help on using the changeset viewer.