10

The documentation is not very clear to me as sending an email adding multiple email address as BCC and CC.

Should I use:

-b email@dom.com -b email2@dom.com

or

-b email1@dom.com email2@dom.com

or should the emails be comma separated?

Pat R Ellery
  • 203
  • 1
  • 2
  • 12

2 Answers2

7

Documentation (man page) says:

mutt [-nx] [-e cmd] [-F file] [-H file] [-i file] [-s subj] [-b addr] [-c addr] [-a file [...] --] addr|mailto_url [...]

which means that the complete -c addr switch must be repeated for each Cc recipient, and -b addr for each Bcc recipient.

The exception being the list of To recipients at the end of the command invocation, which need no switches.

Juancho
  • 2,652
3

For any option of mutt:

mutt [-nx] [-e cmd] [-F file] [-H file] [-i file] [-s subj] [-b addr] [-c addr] [-a file [...] --]

if you have multiple arguments following, you can use quotation marks " and commas , to separate the individual commands within the same group. For example

-e "set content_type=text/html, realname='John Citizen'"

-b "email1@dom.com, email2@dom.com"

Full command:

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, second_persons_email@domain.com, third_persons_email@domain.com" < /home/dir/some_directory/the_HTML_file_you_want_to_send.html

3kstc
  • 132