Re: How to specify sendmail on command line?

Sergey Poznyakoff <[email protected]>
Newsgroups gmane.comp.gnu.mailutils.bugs
Organization GNU.org.ua
Message-ID <[email protected]>
Jean Louis <[email protected]> ha escrit:

> 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:

That's correct.  See http://mailutils.org/manual/html_node/MIME.html for
a discussion on how the --content-type option affects the mail being
composed.

> 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.

As a matter of fact, they are.  The above command produces this header
for the second part:

   Content-Type: text/html; charset=iso-8859-1; name="HTML message"

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

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] < text-file

Regards,
Sergey
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.