天天看点

Shell Sendemail发邮件

Sendmail(){
  smtp='noticemail.yxit.cc'
  account='[email protected]'
  password='123'
  to='[email protected]'
  subject=$1
  content=$2
  sendemail -f $account -t $to -s $smtp -u $subject -o message-charset=utf8 -xu $account -xp $password -m $content -o tls=no
}

subject=‘sub’
res=‘content’
Sendmail "$subject" "$res"      

继续阅读