Skip to content

Commit

Permalink
De 1013 reply to includes from address too 2 0 (#162)
Browse files Browse the repository at this point in the history
* Changed `Tested Up` version of WP

* Changed `Tested Up` version of WP

* Fix bug with wp_mail filter. release new version

* Fixed bug with overriding `Reply-to` header
  • Loading branch information
oleksandr-mykhailenko authored Apr 8, 2023
1 parent b7e9711 commit b3e7070
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 15 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Changelog
=========
1.9.3 (2023-04-08)
- Fixed `Reply-to` header. It's not overridden anymore

1.9.2 (2023-03-28)
- Added action for better dev experience in tracking error `mailgun_error_track`
- Added header `h:Sender`
Expand Down
9 changes: 0 additions & 9 deletions includes/mg-filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,3 @@ function mg_smtp_get_region($getRegion)
return false;
}
}

/**
* @return false|mixed
*/
function isReplyToOverride()
{
$mg_opts = get_option('mailgun');
return (bool)($mg_opts['override-from'] ?? false);
}
3 changes: 0 additions & 3 deletions includes/wp-mail-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,6 @@ function wp_mail($to, $subject, $message, $headers = '', $attachments = [])
$from_name = mg_detect_from_name($from_name);
$from_email = mg_detect_from_address($from_email);
$fromString = "{$from_name} <{$from_email}>";
if (isReplyToOverride()) {
$headers['Reply-to'] = $fromString;
}

$body = [
'from' => $fromString,
Expand Down
2 changes: 1 addition & 1 deletion mailgun.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: Mailgun
* Plugin URI: http://wordpress.org/extend/plugins/mailgun/
* Description: Mailgun integration for WordPress
* Version: 1.9.2
* Version: 1.9.3
* Tested up to: 6.1
* Author: Mailgun
* Author URI: http://www.mailgun.com/
Expand Down
5 changes: 4 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Contributors: mailgun, sivel, lookahead.io, m35dev
Tags: mailgun, smtp, http, api, mail, email
Requires at least: 3.3
Tested up to: 6.1.1
Stable tag: 1.9.1
Stable tag: 1.9.3
Requires PHP: 5.6
License: GPLv2 or later

Expand Down Expand Up @@ -131,6 +131,9 @@ MAILGUN_FROM_ADDRESS Type: string

== Changelog ==

= 1.9.3 (2023-04-08): =
- Fixed `Reply-to` header. It's not overridden anymore

= 1.9.2 (2023-03-28): =
- Added action for better dev experience in tracking error `mailgun_error_track`
- Added header `h:Sender`
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Contributors: mailgun, sivel, lookahead.io, m35dev
Tags: mailgun, smtp, http, api, mail, email
Requires at least: 4.4
Tested up to: 6.1.1
Stable tag: 1.9.2
Stable tag: 1.9.3
Requires PHP: 5.6
License: GPLv2 or later

Expand Down Expand Up @@ -129,6 +129,9 @@ MAILGUN_FROM_ADDRESS Type: string

== Changelog ==

= 1.9.3 (2023-04-08) =
- Fixed `Reply-to` header. It's not overridden anymore

= 1.9.2 (2023-03-28): =
- Added action for better dev experience in tracking error `mailgun_error_track`
- Added header `h:Sender`
Expand Down

0 comments on commit b3e7070

Please sign in to comment.