Link to home
Start Free TrialLog in
Avatar of wantabe2
wantabe2Flag for United States of America

asked on

PHP Code to Mail CC:

How would I add a courtesy copy CC: email address to this code? The variable for the email address is named $Email2

Below is the code I have now:

if (mail($Email, $Subject, $Message, $Headers))

Open in new window


I've tried different variations such as putting the $Email2 in different locations. The email still sends but the subject line is the email address if I add the variable to as such:

if (mail($Email, $Email2, $Subject, $Message, $Headers))

I actually don't need it to CC:, if I could just fix it so the $Email2 is on the TO: line, that would also be fine.
ASKER CERTIFIED SOLUTION
Avatar of Lukasz Chmielewski
Lukasz Chmielewski
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wantabe2

ASKER

Cool website & thanks! I referenced the top 4 lines of example 4 & it worked like a charm!