对于我来说,该文档不是很清楚,因为发送电子邮件时会添加多个电子邮件地址作为密件抄送和抄送。
我应该使用:
-b [email protected] -b [email protected]
或者
-b [email protected] [email protected]
或者电子邮件应该用逗号分隔?
答案1
文档(手册页)说:
mutt [-nx] [-e cmd] [-F file] [-H file] [-i file] [-s subj] [-b addr] [-c addr] [-a file [...] --] addr|mailto_url [...]
这意味着-c addr
必须为每个抄送收件人,以及-b addr
每个密件抄送接受者。
例外情况是到命令调用结束时的收件人,无需任何开关。
答案2
对于任何选项mutt
:
mutt [-nx] [-e cmd] [-F file] [-H file] [-i file] [-s subj] [-b addr] [-c addr] [-a file [...] --]
如果后面有多个参数,可以使用引号"
和逗号,
分隔同一组内的各个命令。例如
-e "set content_type=text/html, realname='John Citizen'"
-b "[email protected], [email protected]"
完整命令:
mutt -e "set content_type=text/html, realname='John Citizen'" -s "This is some subject" -- "this_is_the_email_you_want_to_send_to@recipients_email_address.com, [email protected], [email protected]" < /home/dir/some_directory/the_HTML_file_you_want_to_send.html