Attach URL instead of file

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
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Attach URL instead of file

Post by alex.barylski »

Is this possible?

Ideally I would be ale to do both. Attach a file exclusively as well as just a URL incase attachment size restrictions come into play - not mutually exlusive of course. :P
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Attach URL instead of file

Post by Chris Corbyn »

I think Swift bails if you use Swift_File due to a file_exists() call. But you can more than definitely use file_get_contents() and pass the string the Swift_Message_Attachment.
Post Reply