Ajax attachment upload

merging part for sending mail and attachment (attachments send to server by ajax)