add switch for send mail