1753481 Members
4208 Online
108794 Solutions
New Discussion юеВ

Re: sendmail question

 
SOLVED
Go to solution
Tirza Kiesler
Occasional Advisor

sendmail question

How can I add a subject to the follwing command:

sendmail -f tirza.kiesler@hp.com to:tirza.kiesler@hp.com < sbapprv.log

(I tried adding subject:mysubj but get error messages)
4 REPLIES 4
Pete Randall
Outstanding Contributor
Solution

Re: sendmail question

First, the man page for sendmail states right near the top that "sendmailis not intended as a user interface routine."

I would suggest using mailx instead:

mailx -s tirza.kiesler@hp.com < sbapprv.log


Pete

Pete
Dennis Handly
Acclaimed Contributor

Re: sendmail question

If it isn't obvious, you need to put the subject in quotes if more than one word:
$ mailx -s "longer subject" tirza.kiesler@hp.com < sbapprv.log
Steven E. Protter
Exalted Contributor

Re: sendmail question

Shalom,

If you MUST use sendmail:

http://www.hpux.ws/mailfile2

That script does attachments which was why I developed it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Tirza Kiesler
Occasional Advisor

Re: sendmail question

Thanks to all of you, mailx is perfect for my purpose.