Fixed mail.attachments parsing when variable is undefined.