added a sendmail method