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.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

sendmail and recipient information

SOLVED
Go to solution
Luis Toro
Regular Advisor

sendmail and recipient information

Hello,
We're the following command to forward emails to Exchange users:

echo "Subject: Test \n\n email body" | sendmail -bm -F "Sender" recipient1 recipient2

The users receive the email, however the "To" field is blank, so recipient1 does not know that recipient2 was also sent the same email. Is there a sendmail flag I can modify to disclose all the recipients of an email ?
Thanks
3 REPLIES
Chris Vail
Honored Contributor
Solution

Re: sendmail and recipient information

Instead of sendmail, use mailx:
echo "Body of email"|mailx -s "subject" foo@bar.com -c "coo@far.bom boo@car.fom". Do the man page on mailx for details.

My personal favorite:
for i in foo@bar.com barf@oo.com car@foo.bom
do
echo "Body of email"|mailx -s "subject" $i
done

Chris
Luis Toro
Regular Advisor

Re: sendmail and recipient information

Thanks Chris.

That is the way I would have coded it initially. But given that these sendmail commands are in many scripts, I need a sendmail option (easier to make a global change using sed). In any event, in playing around with some flags, I found what I was looking for:
-ONoRecipientAction=add-to
Luis Toro
Regular Advisor

Re: sendmail and recipient information

See prior comments