Solved

PHP Code to Mail CC:

Posted on 2013-01-15
2
405 Views
Last Modified: 2013-01-15
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.
0
Comment
Question by:wantabe2
2 Comments
 
LVL 27

Accepted Solution

by:
Lukasz Chmielewski earned 500 total points
ID: 38779856
You need to look to the $Headers:
http://php.net/manual/en/function.mail.php
Like Example #4
0
 
LVL 15

Author Closing Comment

by:wantabe2
ID: 38780079
Cool website & thanks! I referenced the top 4 lines of example 4 & it worked like a charm!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now