• Resolved David

    (@davidrajah)


    How to change the reply-to email ID for all the WooCommerce order email response that Admin and User received to their email ID’s.

    We need a solution where new order notifications still go to our dedicated email address, but if the customer decides to hit Reply, we’d like to send their messages to a different email Inbox. Is there a way to do this?

    Thank you,

    https://www.ads-software.com/plugins/woocommerce/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi David,

    In your dashboard, go to WooCommerce > Settings > Emails > Email Options. On that page you can set the “From” email address which is the email address replies should go to if a customer responds to an email sent by WooCommerce.

    Hope this helps!

    Thread Starter David

    (@davidrajah)

    Hi Christi,
    For us we need the from and reply-to email address to be a different one. So can you help me to solve this?

    In our dashboard we have from name and the email address.

    Thank you,

    Hi David,

    Can you clarify why you would need the from and reply-to email addresses to be different? The from email address doesn’t affect where admin order notifications go to.

    What you can do is set up a forwarder so responses would also go to another email address.

    Thread Starter David

    (@davidrajah)

    Christi, We usually use the following email address:

    from email address as <[email protected]>
    to email address as <[email protected]>

    As we have too email emails to be send from <[email protected]>. So can you please help me to solve this.

    Thank you

    Hi David,

    I’m still not clear on why you would need the from and reply-to email addresses to be different (which isn’t possible). If you want notifications of orders to be sent to [email protected], then leave that as the admin email for your WordPress site. Then, so the notifications come from [email protected], set that as the from email address in WooCommerce > Settings > Emails > Email Options. Setting that from email address will not affect where your new order notifications go, it will only effect what email address appears as the sender when customer’s receive notifications.

    Hi David,

    Did you manage to get this sorted out? I am trying to do something similar due to integrations with desk.com

    There is this plugin which looks like it could do the trick. I’m looking to custom code something though so I will keep you posted.

    J

    Thread Starter David

    (@davidrajah)

    Hi Jonny Ruddgenesis,
    Still we have not the issue. Hope you can solve this.

    Thank you,
    David Rajah

    Try this (you’ll need to create it as a plugin)

    https://github.com/jonnyrudd/Woo-commerce-Reply-To-Customer.git

    Let me know how it goes.

    Jonny

    I’ve found this snippet to add to functions.php and works great for me!
    Name and email of customer gets added to new order emails

    /**
    * add customer name and email to new order mail
    */
    function custom_use_customer_from_address ( $from_email, $obj ) {
    	if ( is_a( $obj, 'WC_Email_New_Order' ) ) {
    		$address_details = $obj->object->get_address( 'billing' );
    		if ( isset( $address_details['email'] ) && '' != $address_details['email'] ) {
    			$from_email = $address_details['email'];
    		}
    	}
    	return $from_email;
    }
    add_filter( 'woocommerce_email_from_address', 'custom_use_customer_from_address', null, 2 );
    
    function custom_use_customer_from_name ( $from_name, $obj ) {
    	if ( is_a( $obj, 'WC_Email_New_Order' ) ) {
    		$address_details = $obj->object->get_address( 'billing' );
    		if ( isset( $address_details['first_name'] ) && '' != $address_details['first_name'] ) {
    			$from_name = $address_details['first_name'];
    		}
    		if ( isset( $address_details['last_name'] ) && '' != $address_details['last_name'] ) {
    			$from_name .= ' ' . $address_details['last_name'];
    		}
    	}
    	return $from_name;
    }
    add_filter( 'woocommerce_email_from_name', 'custom_use_customer_from_name', null, 2 );

    @frankietee – those filters will make new orders appear to come from
    [email protected] despite being sent from shop.com. This will get flagged as spam in Gmail etc.

    Best practice is just to use your second filter but combine it with another that adds a reply-to email with [email protected].

    add_filter( 'woocommerce_email_headers', 'mycustom_headers_filter_function', 10, 3);
    
    function mycustom_headers_filter_function( $headers, $object, $order ) {
        if ($object == 'new_order') {
            $headers .= 'Reply-to: '.$order->billing_first_name.' '.$order->billing_last_name.' <'.$order->billing_email.'>' . "\r\n";
        }
    
        return $headers;
    }

    Milestone, Thank you, thank you thank you!

    We’ve been looking for this exact solution, as we’ve been needing to be able to set the Woocommerce ‘reply to’ address for order notifications, so that staff can just hit the reply button to follow up with customers. I’ve implemented the above in our functions.php file, and seems to be working perfectly, so thank you again.

    May even be worth someone turning this into a WordPress plugin for those who might struggle with the above.

    Thanks.

    A pleasure @kingyj! I implemented this in my partner’s store for exactly the same reason.

    It’s all prior art, so I can’t take any writing credit (spot the different coding methods in the two filters)- I just understood the problem and put everything together!

    Would agree that someone more clever than me should align the codes and package it as a plugin though…

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘How to change the reply-to email ID for all the WooCommerce email responses’ is closed to new replies.