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!

Adding a 'CC:' to a mail run in a KSH script

Status
Not open for further replies.

Jitwad

Programmer
Sep 8, 2002
13
CA
I have the followng e-mail run line a script - and I cant remember how to Carbon Copy another e-mail address (It cant be in the TO: address line).

IT="it_dept@blah.com"
USERS="pain_in_ass@blah.com" ;)
REPORT=/some/generic/report.rpt

mailrun()
{
echo report
mail -s &quot;Inventory Adjustment Report&quot; $IT < $REPORT
}

How do I CC the report to the $USERS e-mail variable?

Thnx. :)
 
from the manual :

To send the message letter to the recipient user1@host1 and copies to user2@host2 and user3@host3 , enter:

mail -c &quot;user2@host2 user3@host3&quot; user1@host1<letter


HTH ;-)
Dickie Bird
Honi soit qui mal y pense
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top