下面是我用html正文尝试的代码,没有附加csv文件。运行良好
#!/bin/csh
mutt -e "set content_type=text/html" -s "status report on" rama@abc.com < mail1.html
以下是我在尝试附加csv文件时尝试的代码。但它工作不正常,出现了如下所示的错误。
#!/bin/csh
mutt -e "set content_type=text/html" -s "status report on" -a "sum.csv" rama@abc.com < mail1.html
Can't stat rama@abc.com: No such file or directory
rama@abc.com: unable to attach file.
我可以知道上面的代码出了什么问题吗??
如果您希望收件人位于附件之后,则必须添加--
作为分隔符。
查看手册页面的mutt:
-a file [...] Attach a file to your message using MIME. When attaching single or multiple files, separating filenames and recipient addresses with "--" is mandatory, e.g. mutt -a image.jpg -- addr1 or mutt -a img.jpg *.png -- addr1 addr2. The -a option must be placed at the end of command line options.