d11wtq | This thread has been split from a deceased thread
I am having some trouble with line breaks. Swift Mailer (ver 1.21 for php 4) is adding line breaks.
**Original Text**
Felicia Perkins
Trinity, Alabama
http://www.campusactivism.org/displayperson-3990.htm
**SwiftMailer Output**
Felicia
Perkins
Trinity,
Alabama
http://www.campusactivism.org/displayperson-3990.htm
Not sure if this was fixed in a more recent version? I haven't upgraded, because of the frequency of new versions.
I tried using the regular php mail() function and that works fine.
For line breaks, I'm using \n.
Swift Mailer & Line Breaks
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
If these are long(ish) lines it's not a bug, Swift had auto-compliance on by default in older versions (breaks long lines to be under the 76 char limit). It's no longer on by default.
You can turn it off with $swift->useAutoLineResizing(false). If that doesn't work you may want to post the code.
BTW: \n gets converted to \r\n internally with Swift in any case
Also note that version 2 has been available for over a month...
EDIT | RE frequency of new versions. I'm currently having a version freeze for a month or so at least unless something critical crops up. I would advise upagrading. You have an awfully young version of the code.
You can turn it off with $swift->useAutoLineResizing(false). If that doesn't work you may want to post the code.
BTW: \n gets converted to \r\n internally with Swift in any case
Also note that version 2 has been available for over a month...
EDIT | RE frequency of new versions. I'm currently having a version freeze for a month or so at least unless something critical crops up. I would advise upagrading. You have an awfully young version of the code.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
To be honest (I haven't dug that old version up to check) I'm not even sure early revisions of 1.2 implemented the LF --> CRLF compatabililty. That would make sense for the issue to. Some SMTP servers attrempt to do the replacement but they often end up making a mess of itakreider wrote:I fixed the problem in the old version by replacing all my /n with /r/n - apparently Swift wasn't doing a good job of replacing them on its own (at least in 1.2).