WordPress.org

Ready to get started?Download WordPress

Forums

WP SES
[resolved] Reply-To Header (10 posts)

  1. brohism
    Member
    Posted 1 year ago #

    Does WP SES support custom headers such as Reply-To? I have the Reply-To header configured in Contact Form 7, but it doesn't end up coming through on any emails sent via SES using this plugin.

    http://wordpress.org/extend/plugins/wp-ses/

  2. Sylvain Deaure
    Member
    Plugin Author

    Posted 1 year ago #

    As for now, wp-ses does ignore any header string, because it uses the simplest Amazon api call, that only uses to:
    So Reply-to, cc, bcc are not handled.

    I had similar requests, and it will be handled.

  3. Sylvain Deaure
    Member
    Plugin Author

    Posted 1 year ago #

    Should be ok with version 0.3.1 of the plugin.

    You got a new field "Reply-To" you can set to
    headers

    and it will decode headers to extract the reply-to field.

    Let me know how it works.

  4. brohism
    Member
    Posted 1 year ago #

    The plugin still does not appear to be reading the Reply-To header. I have the value of Reply-To set to headers in the options. I'm using Contact Form 7, and I've set Reply-To in the additional headers field of my form, but no Reply-To address comes through on the sent message.

  5. Sylvain Deaure
    Member
    Plugin Author

    Posted 1 year ago #

    Ok. I'll look into it with Contact Form 7.

  6. bjtalbot
    Member
    Posted 1 year ago #

    This is what I'm using to get the sender's email address into the Reply-To field:

    $headers = 'Reply-To: ' . $contactEmail;

    It's working great. But is it possible to get the sender's name into the Reply-To field as well as the email address? So that you get something like:

    Reply-To: Joe Schmoe <joeschmoe@example.com>

    I can capture that info from my contact form and output it with the message body, but I can't figure out any syntax that will get WP-SES to accept it as part of the Reply-To field.

    Thanks for any help, Silvain!

  7. bjtalbot
    Member
    Posted 1 year ago #

    (Maybe I shouldn't have posted the above question here, since this thread's marked "resolved"....)

  8. bhansson
    Member
    Posted 1 year ago #

    The problem with contact form 7 is because of multiple lines in the header (From: + Reply-To:), and the regexp in WP-SES plugin doesn't support this. But this can easily be fixed by modifying the regexp in wp-ses.php to:

    preg_match('/^Reply-To: ([a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4})\b/imsU', $headers, $rto)

    Notice the /imsU instead of only /i. Meaning that the regexp will be able to find the Reply-To email if $headers contains multiple lines.

    As a sidenote, gmail will refuse to use the Reply-To header if a reverse DNS-lookup on the sending email doesn't match the domain of that email (forgery detection).

  9. Sylvain Deaure
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for Tip, bhanson, I appreciate !
    Will merge and update.

  10. bhansson
    Member
    Posted 1 year ago #

    np, thanks for a great plugin! Keep up the good work.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic