【发布时间】:2020-03-12 08:54:31
【问题描述】:
我正在尝试通过运行 shell 脚本发送带有 2 个附件的电子邮件。下面是代码:
echo "hi attached is the xml file requested.regards Team."| mailx -a this/is/the/path/tools/v2/xml/bad_out/0106_out.xml,this/is/the/path/tools/v2/xml/bad_out/0107_out.xml muc@tm.com,ti@b.com
以下是我得到的错误:
mail: invalid option -- a
Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...
[-- sendmail-options ...]
mail [-iInNv] -f [name]
mail [-iInNv] [-u user]
我也用一个附件尝试了相同的代码,但它仍然给我同样的错误。我还希望正文不是在一行中,而是采用这种格式:
Hi
Attached is the xml file as requested.
Regards
Team.
【问题讨论】:
-
Mutt 可以发送带附件的电子邮件。
-
这能回答你的问题吗? send email with attachment using Unix
标签: linux shell unix email-attachments