Chinaunix

标题: 即发附件又添加信件文字内容的mail如何处理? [打印本页]

作者: yuhe27913    时间: 2008-06-17 16:50
标题: 即发附件又添加信件文字内容的mail如何处理?
uuencode + mailx + here document不可以啊,
只能看到here doc的内容,没有附件。
作者: waker    时间: 2008-06-17 16:56
(uuencode file1 file1
uuencode file2 file2
cat <<\EOF
foo
bar
foobar
EOF
)|mail foo@bar.com
作者: yuhe27913    时间: 2008-06-17 17:00
找到一个link
http://bbs.chinaunix.net/viewthr ... BD%BC%FE&page=2
作者: yuhe27913    时间: 2008-06-17 17:06
最初的写法
# uuencode dailyreport dailyreport | /bin/mailx -s"`date +%Y%m%d`Database Report" myaccount@mycompany.com<< EOF
> `date`
> Hi,All:
> FYI
> EOF
没成功,

# /bin/mailx -s"`date +%Y%m%d`Database Report" myaccount@mycompany.com<<EOF
> `date`
> Hi,All:
> FYI
> `uuencode /home/oracle/dailyreport dailyreport`
> EOF
可以发附件带信文了,uuencode写here doc里面的,真神奇。
作者: yuhe27913    时间: 2008-06-17 17:08
原帖由 waker 于 2008-6-17 16:56 发表
(uuencode file1 file1
uuencode file2 file2
cat  


这个也试过了,OK




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2