Hmm... This probably is a bug in version 3 yes.
Just made sure it doesn't break in version 4 and indeed it doesn't. That's my fault for a lack of interpretation of the RFC when writing v3.
It needs a backslash (which Swift should add, and does add in v4).
This code:
Code: Select all
$message = Swift_Message::newInstance()
->setSubject('A basic message')
->setTo(array('chris.corbyn@swiftmailer.org' => 'Test: Testing'))
->setFrom(array('chris@w3style.co.uk' => 'Myself'))
->setContentType('text/plain')
->setCharset('utf-8')
->setBody('just testing')
;
Produces this output for me:
Code: Select all
Message-ID: <1210734742.482a5896c55b3@swift.generated>
Date: Wed, 14 May 2008 13:12:22 +1000
Subject: A basic message
From: Myself <chris@w3style.co.uk>
To: "Test\: Testing" <chris.corbyn@swiftmailer.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
just testing
Are you doing anything intensive or complex with Swift? You can use version 4 in it's alpha if you want to? I'd show you how to change the code.