Reputation: 265
I am able to attach a file using SwiftMailer with its name hardcoded. But what if the file is uploaded by a user from an HTML form's 'file input type control and has to be sent with an email by a PHP script? How do I specify the file name in SwiftMailer?
Thank you!
Upvotes: 2
Views: 226
Reputation: 5684
I'm pretty sure in this case you could use the $_FILES['file']['tmp_name'] value. This gives the path to the temporary uploaded file.
Upvotes: 1