Fixed file type issue when sending emails