I would like to make the message with multiparts, with text and html.

cat text-file | mail -E"set sendmail=\"sendmail:$HOME/bin/sendmail\"" 
--alternative -s "Something here" --content-type=text/html -A html-file 
[email protected]

In that example I can see that I get multipart/alternative but I see
that content type for text part is text/html instead of maybe
text/plain

Then I have tried this option:

cat text-file | mail -E"set sendmail=\"sendmail:$HOME/bin/sendmail\"" 
--alternative -s "Something here" --content-type=text/html -A html-file 
--content-type=text/plain [email protected] 

And it gives me how it should be. If you have any comment on that last
line, please tell me. I would maybe improve it like:

cat text-file | mail -a "From: [email protected]" "-E"set 
sendmail=\"sendmail:$HOME/bin/sendmail\"" --alternative -s "Something here" 
--content-type=text/html --content-name "HTML message" -A html-file 
--content-name "Test message" --content-type=text/plain [email protected]

But I do not see that attachments are named. Am I doing something wrong?

Should I use:

--append=HEADER: VALUE

to add Bcc or Cc fields? So I have tried it:

cat text-file | mail -a "From: [email protected]" -a "Bcc: [email protected]" 
-E"set sendmail=\"sendmail:$HOME/bin/sendmail\"" --alternative -s "Subject 
here" --content-type=text/html --content-name "HTML message" -A html-file 
--content-name "Test message" --content-type=text/plain [email protected]

I think Bcc/Cc/From works from command line.

additionally it would be good to elimiate piping totally. Do you know
solution for that?


Reply via email to