Operating System - HP-UX
1752327 Members
5878 Online
108786 Solutions
New Discussion юеВ

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