Fixed mail.attachments parsing when variable is undefined.

When mail.attachments is undefined async.each throw an error.