• Resolved computeque

    (@computeque)


    Hi, I have been trying to add a reply-to header to the new quote email sent to admin with the customers email address without success. This would be useful for replying to customers if we need additional information without needing to create a new email thread, would this be something that you could add as an option or define a make reply-to as true/false?

    Thanks 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author pinal.shah

    (@pinalshah)

    Hi @computeque,

    I’ll look into this one and get back to you by tomorrow.

    Thanks,

    Pinal

    Thread Starter computeque

    (@computeque)

    Thank you, is there any update on if this is possible to implement?

    I’ve tried to add it into the template for the request new quote but it always breaks it. I’ve also tried adding something to functions.php to add the reply-to header with the customers email prior to sending, but I can’t seem to get that working either.

    • This reply was modified 2 years, 8 months ago by computeque.
    Plugin Author pinal.shah

    (@pinalshah)

    Hi @computeque,

    Sorry I missed replying to you. You can try adding the below code to the functions.php file. The code uses existing WC hooks. I’ve added checks to compare and make sure that the headers are modified only for the quote email notification being sent to the admin.

    function modify_addr( $default_addr, $email, $from_email ) {
    
    	if ( 'qwc_req_new_quote' === $email->id ) {
    		$email_obj = $email->object;
    		$default_addr = $email_obj->billing_email; // Customer Email Address.
    	}
    	return $default_addr;
    }
    add_action( 'woocommerce_email_from_address', 'modify_addr', 10, 3 );

    The above code modified the reply to email address.

    function modify_name( $default_name, $email, $from_name ) {
    	if ( 'qwc_req_new_quote' === $email->id ) {
    		$default_name = 'Customer';
    	}
    	return $default_name;
    }
    add_action( 'woocommerce_email_from_name', 'modify_name', 10, 3 );

    This will modify the Name in the Reply-to: header.

    I hope this helps.

    Thanks,

    Pinal

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Reply-to for admin email’ is closed to new replies.