Changeset 3126570
- Timestamp:
- 07/27/2024 02:46:50 PM (8 months ago)
- Location:
- mailgun/trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
mailgun/trunk/CHANGELOG.md
r3120706 r3126570 1 1 Changelog 2 2 ========= 3 4 2.1.0 (2024-07-27) 5 - Added ability to suppress Track Clicks when we send Reset Password email (it was an issue with domain url in the email) 6 - Added field to setup Reply-to(header) email for the emails. 7 - When constants MAILGUN_TRACK_CLICKS, MAILGUN_TRACK_OPENS are used, we disable field on the UI as we do for other fields 3 8 4 9 2.0.1 (2024-07-17) -
mailgun/trunk/includes/admin.php
r3050593 r3126570 416 416 $secure = (defined('MAILGUN_SECURE') && MAILGUN_SECURE) ? MAILGUN_SECURE : $this->get_option('secure'); 417 417 $sectype = (defined('MAILGUN_SECTYPE') && MAILGUN_SECTYPE) ? MAILGUN_SECTYPE : $this->get_option('sectype'); 418 $replyTo = (defined('MAILGUN_REPLY_TO_ADDRESS') && MAILGUN_REPLY_TO_ADDRESS) ? MAILGUN_REPLY_TO_ADDRESS : $this->get_option('reply_to'); 418 419 419 420 if (!$getRegion) { … … 449 450 450 451 try { 452 $headers = [ 453 'Content-Type: text/plain', 454 'Reply-To: ' . $replyTo, 455 ]; 456 451 457 $result = wp_mail( 452 458 $admin_email, … … 454 460 sprintf(__("This is a test email generated by the Mailgun WordPress plugin.\n\nIf you have received this message, the requested test has succeeded.\n\nThe sending region is set to %s.\n\nThe method used to send this email was: %s.", 455 461 'mailgun'), $region, $method), 456 ['Content-Type: text/plain']462 $headers 457 463 ); 458 464 } catch (Throwable $throwable) { -
mailgun/trunk/includes/options-page.php
r3040805 r3126570 46 46 $mailgun_from_address = $mailgun_from_address_const ?: $this->get_option('from-address'); 47 47 48 $mailgunReplyToAddressConst = ((defined('MAILGUN_REPLY_TO_ADDRESS') && MAILGUN_REPLY_TO_ADDRESS) ? MAILGUN_REPLY_TO_ADDRESS : null); 49 $mailgunReplyTo = $mailgunReplyToAddressConst ?: $this->get_option('reply_to'); 50 48 51 $mailgun_secure_const = (defined('MAILGUN_SECURE') ? MAILGUN_SECURE : null); 49 52 $mailgun_secure = !is_null($mailgun_secure_const) ? ((string)(1 * $mailgun_secure_const)) : $this->get_option('secure'); … … 52 55 $mailgun_use_api = !is_null($mailgun_use_api_const) ? ((string)(1 * $mailgun_use_api_const)) : $this->get_option('useAPI'); 53 56 $icon = $mailgun->getAssetsPath() . 'icon-128x128.png'; 57 58 $trackClicks = (defined('MAILGUN_TRACK_CLICKS') ? MAILGUN_TRACK_CLICKS : null); 59 $trackOpens = (defined('MAILGUN_TRACK_OPENS') ? MAILGUN_TRACK_OPENS : null); 60 61 $suppressClicks = $this->get_option('suppress_clicks') ?: 'no'; 54 62 55 63 ?> … … 258 266 </th> 259 267 <td> 260 <select name="mailgun[track-clicks]" >268 <select name="mailgun[track-clicks]" <?php echo $trackClicks ? 'disabled="disabled"' : '' ?>> 261 269 <option value="htmlonly"<?php selected('htmlonly', $this->get_option('track-clicks')); ?>><?php _e('HTML Only', 'mailgun'); ?></option> 262 270 <option value="yes"<?php selected('yes', $this->get_option('track-clicks')); ?>><?php _e('Yes', 'mailgun'); ?></option> … … 281 289 </th> 282 290 <td> 283 <select name="mailgun[track-opens]" >291 <select name="mailgun[track-opens]" <?php echo $trackOpens ? 'disabled="disabled"' : '' ?>> 284 292 <option value="1"<?php selected('1', $this->get_option('track-opens')); ?>><?php _e('Yes', 'mailgun'); ?></option> 285 293 <option value="0"<?php selected('0', $this->get_option('track-opens')); ?>><?php _e('No', 'mailgun'); ?></option> … … 319 327 </td> 320 328 </tr> 329 <tr> 330 <th scope="row"> 331 <?php _e('Reply To Address', 'mailgun'); ?> 332 </th> 333 <td> 334 <input type="text" 335 class="regular-text" 336 name="mailgun[reply_to]" 337 value="<?php esc_attr_e($mailgunReplyTo); ?>" 338 placeholder="[email protected]" 339 /> 340 <p class="description"> 341 <?php 342 _e('Reply-to address', 'mailgun'); 343 ?> 344 </p> 345 </td> 346 </tr> 321 347 <tr valign="top"> 322 348 <th scope="row"> … … 377 403 ); 378 404 ?> 405 </p> 406 </td> 407 </tr> 408 <tr valign="top"> 409 <th scope="row"> 410 <?php _e('Suppress Click Track for password reset email', 'mailgun'); ?> <br> 411 </th> 412 <td> 413 <select 414 name="mailgun[suppress_clicks]"> 415 <option value="yes"<?php selected('yes', $suppressClicks); ?>><?php _e('Yes', 'mailgun'); ?></option> 416 <option value="no"<?php selected('no', $suppressClicks); ?>><?php _e('No', 'mailgun'); ?></option> 417 </select> 418 <p class="description"> 419 <span><?php _e('Experimental function', 'mailgun'); ?></span> 379 420 </p> 380 421 </td> -
mailgun/trunk/includes/wp-mail-api.php
r3040805 r3126570 257 257 ]; 258 258 259 260 259 $rcpt_data = apply_filters('mg_mutate_to_rcpt_vars', $to); 261 260 if (!is_null($rcpt_data['rcpt_vars'])) { … … 274 273 $trackOpens = empty($mailgun['track-opens']) ? 'no' : 'yes'; 275 274 } 275 276 if (isset($mailgun['suppress_clicks']) && $mailgun['suppress_clicks'] === 'yes') { 277 $passwordResetSubject = __('Password Reset Request', 'mailgun') ?: __( 'Password Reset Request', 'woocommerce' ); 278 if (!empty($passwordResetSubject) && stripos($subject, $passwordResetSubject) !== false) { 279 $trackClicks = 'no'; 280 } 281 } 282 276 283 $body['o:tracking-clicks'] = $trackClicks; 277 284 $body['o:tracking-opens'] = $trackOpens; … … 397 404 } 398 405 406 $replyTo = (defined('MAILGUN_REPLY_TO_ADDRESS') && MAILGUN_REPLY_TO_ADDRESS) ? MAILGUN_REPLY_TO_ADDRESS : get_option('reply_to'); 407 if (!empty($replyTo)) { 408 $headers['Reply-To'] = $replyTo; 409 } 410 399 411 // Set custom headers 400 412 if (!empty($headers)) { -
mailgun/trunk/languages/mailgun-de_DE.po
r1919013 r3126570 205 205 msgid "Save Changes" 206 206 msgstr "Änderungen speichern" 207 208 msgid "Reply-to address" 209 msgstr "Antwortadresse" 210 211 msgid "Suppress Click Track for password reset email" 212 msgstr "Klick-Tracking für Passwort-Reset-Email unterdrücken" -
mailgun/trunk/languages/mailgun-es_ES.po
r1919013 r3126570 206 206 msgid "Save Changes" 207 207 msgstr "Guardar cambios" 208 209 msgid "Reply-to address" 210 msgstr "dirección de respuesta" 211 212 msgid "Suppress Click Track for password reset email" 213 msgstr "Suprimir seguimiento de clics para el email de restablecimiento de contraseña" -
mailgun/trunk/languages/mailgun-pt_BR.po
r1919013 r3126570 364 364 msgid "http://www.mailgun.com/" 365 365 msgstr "" 366 367 msgid "Reply-to address" 368 msgstr "" 369 370 msgid "Suppress Click Track for password reset email" 371 msgstr "" -
mailgun/trunk/mailgun.php
r3120706 r3126570 4 4 * Plugin URI: http://wordpress.org/extend/plugins/mailgun/ 5 5 * Description: Mailgun integration for WordPress 6 * Version: 2. 0.16 * Version: 2.1.0 7 7 * Requires PHP: 7.4 8 8 * Requires at least: 4.4 -
mailgun/trunk/readme.md
r3120706 r3126570 4 4 Contributors: mailgun, sivel, lookahead.io, m35dev, alanfuller 5 5 Tags: mailgun, smtp, http, api, mail, email 6 Tested up to: 6. 5.57 Stable tag: 2. 0.16 Tested up to: 6.6.1 7 Stable tag: 2.1.0 8 8 License: GPLv2 or later 9 9 … … 67 67 MAILGUN_TRACK_CLICKS Type: string Choices: 'yes' or 'no' 68 68 MAILGUN_TRACK_OPENS Type: string Choices: 'yes' or 'no' 69 MAILGUN_REPLY_TO_ADDRESS Type: string 69 70 ``` 70 71 … … 131 132 132 133 == Changelog == 134 135 = 2.1.0 (2024-07-27): = 136 - Added ability to suppress Track Clicks when we send Reset Password email (it was an issue with domain url in the email) 137 - Added field to setup Reply-to(header) email for the emails. 138 - When constants MAILGUN_TRACK_CLICKS, MAILGUN_TRACK_OPENS are used, we disable field on the UI as we do for other fields 133 139 134 140 = 2.0.1 (2024-07-17): = -
mailgun/trunk/readme.txt
r3120706 r3126570 4 4 Contributors: mailgun, sivel, lookahead.io, m35dev, alanfuller 5 5 Tags: mailgun, smtp, http, api, mail, email 6 Tested up to: 6. 5.57 Stable tag: 2. 0.16 Tested up to: 6.6.1 7 Stable tag: 2.1.0 8 8 License: GPLv2 or later 9 9 … … 130 130 == Changelog == 131 131 132 = 2.1.0 (2024-07-27): = 133 - Added ability to suppress Track Clicks when we send Reset Password email (it was an issue with domain url in the email) 134 - Added field to setup Reply-to(header) email for the emails. 135 - When constants MAILGUN_TRACK_CLICKS, MAILGUN_TRACK_OPENS are used, we disable field on the UI as we do for other fields 136 132 137 = 2.0.1 (2024-07-17): = 133 138 - Updated changelog
Note: See TracChangeset
for help on using the changeset viewer.