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!

using a header file in sendmail command

Status
Not open for further replies.

cawthor

Programmer
May 31, 2001
89
US
How can I create my entire mail item in a file, and then send it via sendmail? Eg: I have a txt file containing all my mail info, To:, From: Subject: body...etc. I thought I could use the '-t' flag to pull all this info, eg:

$ sendmail -t mailitem.txt

However, I get the error :

No recipient addresses found in header

even though I have a 'To: aaa@aaa.com' line in the file.
Any ideas?
 
If your From, To, Subject, etc fields are away from the margin, sendmail seems to have this problem. Put them at the begining of the line without leaving any spaces and it should work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top