男明星女装照:uuencode发送带附件的文件

来源:百度文库 编辑:中财网 时间:2024/05/10 14:38:05
 
1. 用uuencode转换你的附件uuencode attachment_name your_attachment_new_name比如:你有一个文件叫“test.txt”, 但你想让这个文件在加到邮件的附件后,在对方的MUA中附件显示的名字是“sailor.log”uuencode test.txt sailor.log >a.tmp这时你打开"a.tmp",开头会有一行begin 644 sailor.log,说明这个文件会以sailor.log的文件名向大家展示2. 添加邮件正文打开刚刚save的“a.tmp",在开头加加上你想要写的正文,即邮件的body部分。比如"a.tmp"的内容如下:begin 644 sailor.log
-:&5L;&\@=V]R;&0A"@``
`
end

在begin的前面加入你的正文,如
this is a messagebegin 644 sailor.log
-:&5L;&\@=V]R;&0A"@``
`
end

3. 发送邮件 mail -s "this is mail subject" zhan@websense.com好了,现在这封邮件发出去了。它发给了”zhan@websense.com".邮件的正文是你字上一步加入的“this is a message”邮件的附件名是你自定义的“sailor.log"邮件的附件的内容是你以前的文件”text.txt"邮件的subject是“this is mail subject"
另:mail的一点常识1. 如果在发送时加上参数-v,会看到服务器的相应哦2. 如果想改变sender的地址可以加上“-- -f ”,如: mail -v -s "sadooof" zhan@websense.com3. Centos下安装 uuencode 命令如下: # yum install sharutils