Adding MIME headers to emails sent using Swift Mailer
Posted: Mon May 18, 2009 5:07 pm
Hello all,
I have the following mail script;
My question is; how do i specify the email type? e.g. text/html so any HTML within the message gets rendered in the email (such as the <b> tags in the message)
thanks in advance!
I have the following mail script;
Code: Select all
<?php
require_once('SwiftMailer/lib/swift_required.php');
$transport = Swift_SmtpTransport::newInstance('SMTP.blueyonder.co.uk', 25)
->setUsername('xxxxx')
->setPassword('xxxxx')
;
$mailer = Swift_Mailer::newInstance($transport);
$message = Swift_Message::newInstance('New Knitterbabes Sales')
->setFrom(array('xxxxxx' => 'xxxxx'))
->setTo(array('xxxxxxxx' => 'xxxxxx'))
->setBody("<b>TEST</b>")
;
$result = $mailer->send($message)
?>thanks in advance!