Custom Reply To Address
-
Hi,
First up. Wonderful plugins. It’s very nice that you give most of the features that users would need in the free version of the plugin itself. No wonder the plugin is so successful.I need to set a custom reply-to address. I cannot use the from address as reply-to address. I understand searching here in this support forum and also elsewhere, a small snippet of code in the functions.php can accomplish this. For my sake and that of others who will land up here for this very reason, can you please post it here. I couldn’t find the exact snippet in this support forum posted anywhere.
Thanks!
-
Hi @darkblack,
The “reply-to” email address is not controlled through WP Mail SMTP plugin settings.
For example, if you’re using a plugin like WPForms to create your forms on your site, you can set a “reply-to” email within the form notification settings. In case it helps, please refer to the following guide.
If you’re using a different plugin, you need to get in touch with the plugin author to see a possible workaround.
Thanks!
Hi. Sorry for the deplayed response. I am just using woocommerce. I want the customer to reply to (a specific address) for order related notification emails woocommerce sends the customers?
Can something like this be done?
Kindy advice.
-
This reply was modified 4 years, 11 months ago by
darkblack. Reason: mentioned the wrong url the first time
HI @darkblack,
Yes, you can accomplish this with the custom codes like that which apply specific to WooCommerce emails and do not modify other email behaviour.
If you’d like to add reply to to all the email sent from your site you can use wp_mail filter like this:
add_filter( 'wp_mail', static function( $args ) { $reply_to = sanitize_email( 'reply-to@site.com'); if ( is_array( $args['headers'] ) ) { $args['headers'][] = 'Reply-To: ' . $reply_to; } else { $args['headers'] .= 'Reply-To: ' . $reply_to . "\r\n"; } return $args; }, 10, 1 );I hope this helps!
-
This reply was modified 4 years, 11 months ago by
The topic ‘Custom Reply To Address’ is closed to new replies.