Added functionality for sending email attachments