support both sendmail and SMTP

Both are well tested