Modified html_meila_handler to support file attachments