Hi all,
I have this bit of script I worked on a long time ago but the boss now wants me to add a cc to the email. It must be put near the From : but I can't remember.
[syntax=php]$headers .= "From: Company <chris@me.net>\r\n";
mail($email, $subject, $msg, $headers);
$msg2 = 'A demo of Freeform DF was requested by '.$email;
mail("chris@forge.net","FF DF Demo Requested", $msg2, $headers);
include("http://www.mettle-animation.com/forge/thankYou.htm");
$file=fopen("demoEmailList.txt", "a+");
fwrite($file, $email."\n");
fclose($file);[/syntax]
How do I add a CC to this php email script?
Moderator: General Moderators
-
slipstream
- Forum Commoner
- Posts: 86
- Joined: Fri Apr 19, 2002 8:53 am
- Location: Canada
PHP.net is your friend
.
They have examples of most functions, here is the one for the mail function:
They have examples of most functions, here is the one for the mail function:
Code: Select all
<?php
/* additional headers */
$headers .= "To: Mary <mary@example.com>, Kelly <kelly@example.com>\r\n";
$headers .= "From: Birthday Reminder <birthday@example.com>\r\n";
$headers .= "Cc: birthdayarchive@example.com\r\n";
$headers .= "Bcc: birthdaycheck@example.com\r\n";
?>