ActiveCampaign / postmark-wordpress

The Official Postmark Wordpress Plugin
GNU General Public License v2.0
17 stars 17 forks source link

Register and recognize response headers for cc, bcc, and reply-to #1

Closed andrewhaines closed 9 years ago

andrewhaines commented 9 years ago

This is derived from (pretty explicitly) Gagan Deep Singh's updates elsewhere.

andrewhaines commented 9 years ago

Found a few more (re)testing issues once initially requested.

jptoto commented 9 years ago

@andrewhaines Thanks for the PR!

JamesJosephFinn commented 5 years ago

@andrewhaines Is there a code example of the filter(s) used to set these headers? For example, currently I'm using this snippet with the Sparkpost plugin to set replyto:

add_filter('wpsp_reply_to', function($replyTos) {
    return 'Foo Bar <foo@bar.dev>';
});

Many thanks! Pax!

pgraham3 commented 5 years ago

@JamesJosephFinn Can you try something like this:

add_filter( 'wp_mail', function( $headers['Reply-To'] ) {
  return 'Foo Bar <foo@bar.dev>';
});

The Postmark plugin overrides wp_mail so you can hook into it for setting the Reply-To address. If you are going to be using the same Reply-To address consistently for a sender signature, you can also set that up within the Postmark account as well.