Support » Plugin: WP Mail SMTP by WPForms » Reply-to

  • Resolved Joshbaker

    (@joshbaker)


    Hi is there a way you can change or add the reply-to header. I’m trying to change it from a plugin I am building but we are using your smtp plugin to actually send the email.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Sanjeev Aryal

    (@sanzeeb3)

    Hi @joshbaker,

    I apologize for any confusion. You can absolutely add the reply-to header while using wp_mail() from the plugin you’re building and it will route the emails through WP Mail SMTP.

    I hope this helps!

    Ok I used this filter but it didn’t seem to work:

    function swp_reply_to($args) {
    $args[‘headers’] = array(‘Reply-To: Name <joshbaker90@gmail.com’);
    return $args;
    }
    add_filter ( ‘wp_mail’, ‘swp_reply_to’);

    function wploop_email_content_type() {
    return ‘text/html’;
    }

    Any ideas?

    Plugin Support Sanjeev Aryal

    (@sanzeeb3)

    Hi @joshbaker,

    The code snippet works fine. You have a missing > sign:

    $args['headers'] = array('Reply-To: Name <joshbaker90@gmail.com>' );

    You can also find examples here: https://developer.wordpress.org/reference/functions/wp_mail/.

    I hope this helps!

    Great thanks for this,

    Add that’s why your a programmer and I’m not. Attention to detail thanks so much for your help!

    • This reply was modified 6 months, 1 week ago by Joshbaker.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Reply-to’ is closed to new replies.