Page 1 of 1

Swiftmailer and blobs

Posted: Sat Nov 24, 2007 1:33 pm
by markwenham
Hi,
I wish to embed an image stored in a mysql db as a blob into a swiftmailer message. Is this possible? Can you point me in the right direction.
Thanks, Mark

Re: Swiftmailer and blobs

Posted: Wed Nov 28, 2007 9:09 pm
by Chris Corbyn
markwenham wrote:Hi,
I wish to embed an image stored in a mysql db as a blob into a swiftmailer message. Is this possible? Can you point me in the right direction.
Thanks, Mark
It's possible yes. Just use the EmbeddedFile class instead of the Image class. EmbeddedFile can take a string of bytes (i.e. your BLOB data) along with a Content-type.