Swiftmailer and blobs

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
markwenham
Forum Newbie
Posts: 13
Joined: Fri Aug 16, 2002 11:33 pm

Swiftmailer and blobs

Post 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
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Swiftmailer and blobs

Post 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.
Post Reply