Support » Plugin: Contact Form 7 » HTML Email breaks when someone has name with an apostrophe

  • Hey CF7 Dev.. great work on an amazing plugin. I have a bug to report about using HTML Emails in contact form and when someone submits a form with a name like “O’Connor”. Here’s the deal.

    I have a form with the “Use HTML Content type” for Mail 2 checked off. It’s supposed to send a receipt to [first-name] [last-name] <[email]> which normally works swimmingly.

    However, if someone uses an apostrophe in the text input for [last-name] the form successfully sends and tells the user it went through but it breaks the recipient address on the server and i get an error in the server log with these headers I removed the persons email address:

    Received: by (Postfix, from userid 11422696)
            id BEB287089B; Mon, 15 Aug 2011 19:04:53 -0700 (PDT)
            O&;Connor <>
    Subject: Free Class Signup Confirmation
    Date: Tue, 16 Aug 2011 02:04:53 +0000

    It looks like the ‘ in O’Connor must be getting sent as the HTML Entity &#8217 and it splits it up into three recipients, “Corrine”, “0&#8217” and “Connor <>”

    To circumvent this rare occurrance (most people don’t have hyphenated names). I’m changing my send to line from [first-name] [last-name] <[email]> to just [email]. I’d rather use the former so that the customer service dept that receives the email can see the person’s name in the preview of the email instead of as HTML in the body of the email.

    My other question is… will WordPress make anything that’s not a letter an HTML entity? Including “-” for hyphenated last names?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Takayuki Miyoshi


    Thanks for reporting this. I confirmed that the current version has a bug that causes this kind of issue when you use HTML mail. It will be fixed in the next release.


    I want to confirm: has this apostrophe in the email address bug been fixed with the current release?

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘HTML Email breaks when someone has name with an apostrophe’ is closed to new replies.