Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sendmail command line How to add headers

Status
Not open for further replies.

anjaan

Technical User
Jul 8, 2004
2
US
Hi all,

How would I add custom headers when sending an email from Linux command line?

#sendmail toaddress@.com
This sends a blank email with no subject or body.

Thanks
 
Have a look at the command mail.

echo "This is a test" | mail -s "subject" user@hostname.tld
 
Thaanks. I would also like to include headers along with subject and body. Is there a way to do that?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top