wp_mail return-path

Plugin Banner

wp_mail return-path

by barnz99

Download
Description

This plugin sets the PHPMailer Sender (return-path) the same as the From address if it’s not correctly set.

Mitigates the “via” and “The actual sender of” Notification in Outlook and stops email going to spam/junk because of the mismatch between From and Return-Path headers.

This usually occurs on shared hosting servers when local user / domain is used as default for the return-path header and WordPress only sets the From header.

  1. Unzip all files to the /wp-content/plugins/ directory
  2. Log into WordPress admin and activate the ‘Latest Tweets’ plugin through the ‘Plugins’ menu

Just what the doctor ordered

By nigelpentland on November 10, 2024

Works a treat and fixes an otherwise troublesome issue. Many thanks.

Works as expected

By Em (mcottell) on November 20, 2023

Needed to be able to set return-path email header in my WordPress emails so that they don't get flagged as spam. This plugin does the trick.

Thanks for the plugin. To be honest, this should be part of WP.

By Anonymous User 9018418 (anonymized_9018418) on October 28, 2021

It works, and it fixes a major flaw of WP.

All good

By asterix30 on June 16, 2020

Finally I am able to use proper email addresses. Thanks

Works as expected

By fuchsws on February 25, 2018

... and just does what it should do, thanks!

Working with WP 4.9.2

By Thomas Maier (webzunft) on February 1, 2018

It still works and solves the issue it supposed to solve.

Works in WP 4.7.4

By cmconway on May 4, 2017

Works with 4.7.4. I'm also using gravity forms and Avada theme. Installing it was quick and it removed the "via" header from emails sent from my site's gravity forms notifications to gmail. There's more to removing the via header (DKIM, SPF, From header, etc) but this was the missing piece for my site.

Works as intended

By Robin Labadie on October 19, 2016

Thanks for this simple and nice plugin 🙂

Works for me

By laserjones on September 29, 2016

This solved a problem I had with the popular "Newsletter" plugin. Even though I had expressly set the return path for my newsletters to the same address as the "From" (sender) address, bounces (error messages about undeliverable messages) were not sent back to this address, but to a default address of the server ("info@" plus my domain). After installing this little plugin, it worked as it should. Thanks a lot for this precious little plugin!

1.1.1

  • Tested with 6.3

1.1.0

  • Tested with 5.6.1
  • Fixed typo on filter_var
  • Changed to a singleton class

1.0.3

  • Tested with WordPress 4.9.4

1.0.2

  • Now only sets the sender if it’s not already set with a valid email address.

1.0.1

  • Tested on 4.4

1.0.0

  • Inital Release

0.0.1

  • Beta Release
Back to top