SwiftMailer Component
Based on the really cool SwiftMailer library by Chris Corbyn, a serious alternative to PHPMailer. This Component makes it easy to send views, or wrap a body message with a layout, suitable for newsletter for example, in addition, it embeds the images in the view on the fly, so you don’t have to change your Cake habits ( you use $html->image as you would normally ). you just need to add an attribute to the images you want to send with a embed=”swift”
Hmm what else, oh yea there are some utility functions that make life a bit easier, read it cake-ish.
a note though, this Component doesn’t intend to hide the functionalities of Swift, its syntax is alreay clean, inventing another one is just pointless.
You can download the Swift Mailer Component from bakery. oh yeah the tutorial is there too.
Cake!
on February 21, 2007 on 1:30 pm
Hi Oth,
your component works really well, thanks for that! I do have a small problem though. When I add an image to my mail in the view, I can add images with a static path, but not with a dynamic path.
this works:
echo $html->image(’cake.power.png’, array(’embed’=>’swift’));
and this doesn’t:
echo $html->image($image1, array(’embed’=>’swift’));
Have you got an idea about what’s happening?
on February 21, 2007 on 6:22 pm
Hello Ron,
It shouldn’t matter
$image1 = ’cake.power.png’;
$html->image($image1, array(’embed’=>’swift’));
should work.