Added send email with attachment function