#!/bin/sh
#此文件保存为GB2312文件
email_content="中文邮件内容测试"
email_subject="标题"
attachment="mail.txt"
attachment1="test.sh"
dest_mail1=yuexxx@yeah.net
dest_mail2=yuexx@bsr.com.cn
dest_mail3=liuxx@bsr.com.cn
source_alias="bsxarxx"
source_mail=yuexxx@bxx.com.cn
source_paswd=xxxxxxx
(echo -e "To: <${dest_mail1}>\nCc: \"${dest_alias2}\" <${dest_mail2}>\nFrom: \"${source_alias}\" <${source_mail}>\nSubject: ${email_subject}\n\n${email_content}";\
uuencode ${attachment} mail.txt;uuencode ${attachment1} test.sh) | \
/usr/sbin/sendmail -v -f $source_mail -t yuexxx@bstar.com.cn \
-S smtp.xxx.com.cn -au$source_mail -ap$source_paswd
以上是mailtest.sh,foxmail接收效果