When I receive a plain text version of an email created with Filtered HTML, the node content comes through like the following.
======== THIS IS A DEMO
======================================================
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim
veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit
esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est
laborum.
When I receive a plain text version of an email created with Full HTML all of the node content and template elements are turned into one large paragraph.
In both instances the HTML versions come through as they should.
Any help is appreciated.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | enews-better_plain_text-935100-5.patch | 8.51 KB | aaronbauman |
Comments
Comment #1
jbomb commentedThis has something to do with the Basic E-news module, and the function that Drupal uses to convert HTML strings into plain text. This isn't ideal, but for now you should be able to adjust the plain text email on the campaign content tab of the newsletter before launching the campaign.
Are you using a wysiwyg? If so, how is it configured to deal with line breaks?
Comment #2
boringusername commentedWe're using an out of the box installation of ckeditor. There haven't been any changes to the configuration.
The example I showed in my initial post is all one paragraph and the line breaks are there whether it's pasted into ckeditor or typed in by hand.
We have discussed having the client for now editing the text version by hand to resolve the issue. And you're correct, it isn't an ideal solution, but may be the best we can provide for them at this point.
Thanks for your help.
Comment #3
jbomb commentedI looked into this a little more and it seems that drupal_html_to_text follows the specification for generating a "flowed" text version of the html. It looks to me, that VerticalResponse does not specify format in the email headers, and so "fixed" is assumed by the email client.
I haven't had time to pursue this on the VerticalResponse side of the problem, but the issue has been raised here in their marketing lounge.
Comment #4
aaronbaumanFigured out this is an issue in the way Drupal and mailing services (like VR) treat email line lengths.
Drupal wraps at 77-characters. (see _drupal_wrap_mail_line)
VR enforces a 70-character lines. (see this discussion.
This conflict results in the doubly-wrapped lines you're seeing.
In order to make this work, we have to generate a plaintext version with 70-character lines. Right now enews uses drupal_html_to_text to generate plaintext, so unless we hack/patch core, we have to write a version of _drupal_wrap_mail_line in enews module that adheres to standard mailer practices - as few as 70 chars.
Tasking myself with this, but anyone please feel free to take it on.
Comment #5
aaronbaumanSee if this works for you