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:

> echo Text | mail -E'set sendmail="~/bin/sendmail"' -s "Something here" --content-filename=text/html -A html-file [email protected]

Use this instead:

  mail -E"set sendmail=\"sendmail:$HOME/bin/sendmail\"" ...

Rationale:

1. URL must start with a scheme followed by column.  In your example,
it is missing, hence you get "URL missing required parts" error.
To be precise, Mailutils does allow for URLs starting with '/'
instead, but these imply the 'prog://' scheme, which is not what you
want anyway.

2. The tilde character is not expanded within URLs (whether it should
or not is another matter), so you have to use the $HOME variable to
expand to the absolute pathname of your homedir.

3. Single quotes would prevent expansion of $HOME.  Double-quotes must
be used instead.  Correspondinly, any occurrence on double-quote within
the string must be escaped.

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.