WordPress.org

Ready to get started?Download WordPress

Forums

Jetpack by WordPress.com
Contact Form (possible) bug (6 posts)

  1. bart086c
    Member
    Posted 10 months ago #

    I am using the Jetpack Contact form, and have run into a possible bug.

    I find that when I build the form with a Name field the outgoing email works. When the name field is deleted from the contact form, then the Jetpack contact module causes a mal-formed Reply To address. My host server (Bluehost) refuses to accept the email because in the Reply To field the email address is repeated as a name, i.e.:

    Reply-To: user@domain.com <user@domain.com>

    This mal-formed header address is one of several examples listed that will not be accepted by the server as seen in Bluehost KB doc # 206:

    **********************************************************
    Examples of headers that will NOT work:

    From: "user@domain.com"
    From: user @ domain.com
    From: user@domain.com <user@domain.com>
    **********************************************************

    This double email declaration is out of compliance with RFC 2822, so this is not just a Bluehost peculiarity. That RFC states (some examples of proper format):

    user@example.com
    user@example.com, anotheruser@example.com
    User <user@example.com>

    The clue for the emails not going out was in the server error log, which shows the double declaration of the email address:

    **********************************************************
    +++ 1VPhDC-0007Av-6L has not completed +++
    2013-09-27 17:12:38 1VPhDC-0007Av-6L H=localhost (boxxxx.bluehost.com) [100.0.0.0]:4xxx5 F=<user@mydomain.com> rejected after DATA: syntax error in 'Reply-To:' header when scanning for sender: malformed address: <person@somemail.net> may not follow person@somemail.net in "person@somemail.net <person@somemail.net>"
    **********************************************************

    This seems to be a bug in the Jetpack contact module, in that when the Name field is deleted from the form it just repeats the email address as the name. This presents as a problem with some email servers.

    This error is also true if the Name field is made optional, and then left blank by the site visitor.

    And as a note, the sendmail_path has these three flags set:

    -t -i -f

    Am I missing something here or is this really a bug in the Jetpack Contact form??

    bc

    http://wordpress.org/plugins/jetpack/

  2. Jeremy Herve
    Happiness Engineer
    Plugin Author

    Posted 10 months ago #

    That seems like a bug indeed. I've logged all the details you gave us here, and we'll try to find a work around this problem in a future Jetpack release.

    Thanks for the report!

  3. bart086c
    Member
    Posted 10 months ago #

    Thanks Jeremy,

    my pleasure

    bc

  4. Ian Dunn
    Member
    Posted 5 months ago #

    This was mentioned in https://core.trac.wordpress.org/ticket/21659, but after a deeper look it appears to be a separate issue.

  5. Ian Dunn
    Member
    Posted 5 months ago #

    This sounds like a bug in PHPMailer (the library WordPress uses to send e-mail). They should detect if an e-mail address is passed as the name, and then revert to just using the address instead of the Name <address> format.

    Reported upstream at https://github.com/PHPMailer/PHPMailer/issues/193

  6. Ian Dunn
    Member
    Posted 5 months ago #

    It looks like the problem here isn't that the e-mail address is used as the name, but that the name contains a period and isn't quoted. The patch for #21659 will fix this as well.

Reply

You must log in to post.

About this Plugin

About this Topic