简体   繁体   English

用uuencode发送邮件

[英]send mail with uuencode

您好,我想发送一封带有附件的电子邮件,我尝试使用uuencode命令,但是我的邮箱中没有邮件可以帮助我,

cat body.txt | uuencode /root/report-20130322.pdf | mail -s "Daily Report" user@gmail.com

No, sorry, we won't help you use uuencode. 不,抱歉,我们不会帮助您使用uuencode。 But we will recommend that you look at MIME instead. 但是我们建议您改用MIME。 It's the current standard for including non-textual data in email. 这是在电子邮件中包含非文本数据的当前标准。 Whatever programming language you're using, there are many libraries to help you do it right. 无论您使用哪种编程语言,都有许多库可以帮助您正确完成。

which file do you want to attach? 您要附加哪个文件? pipes are from left to right so this is done first and it is illegal: 管道是从左到右,所以先做,这是非法的:

cat body.txt | uuencode /root/report-20130322.pdf

probably you can try 也许你可以尝试

cat body.txt > tmpfile
uuencode /root/report-20130322.pdf >> tmpfile
cat tmpfile | mail -s "Daily Report" user@gmail.com

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM