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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to send a carbon copy of an email?

Status
Not open for further replies.

mudpie4me

Technical User
May 27, 2002
6
US
Can I just use CC to send a copy of the email message or do I have to do something else in the To: line to make it happen? I tried using a comma like To: $email , $email2 but doesnt seem to work, it's only sending to the 1st email address. Cc doesnt work either. What am I doing wrong? Any help is appreciated. I did research for about an hour before posting here but came up empty.


This is part of my script:

print( MAIL "To: $Email\n" );
print( MAIL "From: $textEmail\n" );
print( MAIL "Subject: Blah Blah\n\n" );


Thanks, Bob
 
Using Cc: is appropriate. However, using a comma should also work in any field (to, cc, bcc). Try putting a space after the comma, but not before.

faq219-364 Sincerely,

Tom Anderson
Order amid Chaos, Inc.
 
thanks for the info. I will try that tonight. Thanks Bob
 
You can also put the data in a subroutine and run it twice with a control parameters.
 
Or put the sendmail routine in a for-next loop

There's always a better way...
 
Haunter & tviman, there's no point in sending out multiple emails instead of including multiple addresses in the headers... that's just a waste of resources... let sendmail do that for you much more efficiently.

If you want to send to a big list, I suggest Mail::Bulkmail. Sincerely,

Tom Anderson
Order amid Chaos, Inc.
 
Tom, I agree with you 100%. Just pointing out that there are several ways to achieve the solution. There's always a better way...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top