[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [msmtp-users] insert subject



On Nov 5, 2016, at 3:12 AM, Matus UHLAR - fantomas <uhlar@...186...> wrote:

> On 04.11.16 15:05, jungle Boogie wrote:
>> How can I have a subject inserted when using msmtp in the command
>> line? Unless I have overlooked something, I don't see a flag for a
>> subject, and without it, all mail arrives as (no subject).
> 
> MSMTP is the SMTP client, not mail user agent. If you need modify headers,
> you must do it before passing input to msmtp.

+1

I'm a developer with the AstLinux Project ( http://www.astlinux-project.org ) and we rely on msmtp for sending mail.

Recently we created a bash script to emulate 'mail' or 'mailx', supporting attachments, for only sending mail.

The "/bin/mail" script can be found here:
https://sourceforge.net/p/astlinux/code/HEAD/tree/branches/1.0/package/msmtp/mail.sh

Display Help with:
mail --help

In order to directly call 'msmtp' edit the very last line from 'sendmail' to 'msmtp' unless sendmail is symlink'ed to msmtp already.

We wrote this script for our specific purposes, but it should be generally portable.

jungle Boogie, hope this helps.

Lonnie