Jump to content


This topic is now archived and is closed to further replies.


Using Swift Mail with file attachments

Recommended Posts

Hi all,

I am trying to make a user-uploaded file attachment with Swift and read here http://forums.devnetwork.net/viewtopic.php?p=323522#323522 to do it this way:

Upload the file, using $_FILES['form_field_name']['tmp_name'] as the path:

$swift->addAttachment($_FILES['foo']['tmp_name'], $_FILES['foo']['name'], $_FILES['foo']['type']); 

I get the file to attach and send however when I open the files all that is in it is:


Anyone know what is causing this?


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.