Cannot get content-type: text/plain
-
I am trying to get Contact Form 7 to send plain text emails with appropriate line breaks. I have DE-selected the “use HTML content type” checkbox.
Upon doing that, the email arrives with no line breaks at all.
Message Body in CF7:
From: [first-name] [last-name] Email: [email] Phone: [phone] Message Body: [message]
Message body received via email:
From: FIrstname Lastname Email: [email protected] Phone: 3045551212 Message Body: Test plain text email
I’ve tried various methods of inserting linebreaks that I have found online (ie. \r\n, \n, \r, \\n) and all just display whatever I’ve typed.
In CF7:
From: [first-name] [last-name] \r\n Email: [email] \r\n Phone: [phone] \r\n Message Body: [message] \r\n
The received email:
From: FIrstname Lastname \r\n Email: [email protected] \r\n Phone: 3045551212 \r\n Message Body: Test plain text email line breaks using "rn" \r\n
So next I took a look at the raw source of the emails. In all cases, despite the fact that I have DE-selected “Use HTML content type” the headers all contain:
Content-Type: text/html; charset=UTF-8
So I tried adding the tex/plain header in the “Additional Headers Field” in CF7:
Reply-To: [email] Content-Type: text/plain; charset=UTF-8
But it has no effect on the headers in the received message:
Content-Type: text/html; charset=UTF-8 From: XXXXX <[email protected]> Sender: XXXXX <[email protected]> To: [email protected] Reply-To: [email protected] Subject: Message from xxxxxx Contact Form Date: Mon, 15 Jun 2015 15:24:14 +0000 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline MIME-Version: 1.0
What am I doing wrong and how can I get CF7 to send a plain text email with line breaks?
Thank you.
- The topic ‘Cannot get content-type: text/plain’ is closed to new replies.