Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
cancel
Showing results for 
Search instead for 
Did you mean: 

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