Added a write-email function to open a compose window, also enables attachments