While working with Magento, you may need to send numerous Emails from registration confirmation to order delivery, refund requests and many more. Many times you may require to send Email with attachments without storing them to server as they are no longer required once sent. For example, if you are accepting recruitment applications from the candidates, you don’t require to save their resumes on the web server rather just want to send them directly to Email attachments. This require needs custom code in Magento.

Today I’m going to share custom code to Send Email with Attachment in Magento Without Saving File to Webserver:

This whole process works as getting the files and storing them in a temporary folder and send it as attachments directly to Email without saving as the temporary folder auto removes the files after sometimes.

Note that this code only works with Zend mail.

This simple code saves your time to immediately send Emails without storing attachments in web servers and helps you get rid of saving non-required and unused files to make your server bulky. Hope this code has helped you to fulfill your requirements and still if you need any kind of help, I always welcome questions and feedback through comments.

Click to rate this post!
[Total: 6 Average: 4.2]