Page 1 of 1

[SOLVED] html email and format=flowed

Posted: Wed Apr 11, 2007 7:33 am
by ollip1
I changed to the newest (a very good) version of Swift. I found that the basic setting of sending multipart email changed NOT containing format=flowed

Previous version:

Code: Select all

Content-Type: text/html; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: quoted-printable
Without format=flowed my extensive css settings are not shown. I added following code

Code: Select all

$message->attach(new Swift_Message_Part($html, "text/html", "format=flowed"));
Actually I don't know if that's really right but I got following code to email before html part:

Code: Select all

Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: format=flowed
And it shows html right in the email reader.
Is there poossibly some problems if some email readers or servers cut line lengths to 80 chars? Or is there some better solutions to this? Thanks.

Posted: Wed Apr 11, 2007 9:13 am
by Chris Corbyn

Code: Select all

$message->attach(new Swift_Message_Part($html, "text/html", "format=flowed"));
It's actually:

Code: Select all

$part = new Swift_Message_Part($html, "text/html");
$part->setFlowed(true);
$message->attach($part);
:)

There are no real issues. In the last version it was always flowed, but this actually presents a few minor limitations such as not being able to put > at the start of a line without it having special meaning. You just need to turn it on now that all :)

The 80 char limit can pretty much be lifted to 1000 safely these days. I only have it set low because I use pine (as do a lot of people who like command line tools) and 1000 chars is a very long line in pine.

Code: Select all

$part->setLineWrap(1000);

continuing ok

Posted: Fri Apr 20, 2007 4:28 am
by ollip1
Thanks!
There was left some issues maybe to deal with them later but I can ciontinue now.

Donation for lotion is on the way.

Re: continuing ok

Posted: Fri Apr 20, 2007 5:55 am
by Chris Corbyn
ollip1 wrote:Thanks!
There was left some issues maybe to deal with them later but I can ciontinue now.

Donation for lotion is on the way.
Ah were you the anonymous donor who sent something with the message 'Thanks!'?

Thank you indeed :)