advanced email module for sending attachments