I'm not sure if I just don't know the right settings for tinyMCE, but in all the settings for it that I was able to find with five minutes of fussing, I couldn't get it to give me anything but one very long line of text.
This is problematic because some mail servers don't like really long lines of text. Indeed, in my testing the sever I happened to be getting my mail on didn't like them and it was clipping my messages.
I'm positive there is a better way to fix this problem, but for now I just added this line
$message = str_replace("<br />","<br />\r\n",$mail->message);
inside of the simplenews.module function sn_mail_send().
I'd obviously have to do this again when I upgrade and it likely would have been better to create a content filter to do this--but that would have required a lot more time on my part.
Is there an obvious "best practice" that I just didn't think of to fix this problem? Am I the only one with this problem?
Comments
Comment #1
DriesK commentedI'm not familiar with tinyMCE, never used it. But, is that really what is does? I'm not sure this is something that needs to be fixed in simplenews, or needs a specific content filter. Rather, I would suggest that you file an issue for tinyMCE to insert some line breaks in their HTML output, because it not only causes problems with e-mails, but it also results in unreadble, human-unfriendly source code. Looks as something that can be fixed easily.
Comment #2
sutharsan commentedTinyMCE (4.7) still generates code without newlines. Simplenews produces correct layout in the newsletter (both plain and html). If there is something to fix, it should be in TinyMCE.