Carbon Copy

the mail() function

Moderators: macek, egami, gesf

User avatar
planketa
New php-forum User
New php-forum User
Posts: 152
Joined: Mon Mar 08, 2004 12:29 am
Location: Philippines

Carbon Copy

Postby planketa » Mon Mar 14, 2005 6:08 pm

Guys

How can we include a cc in php mail

what is the syntax?

I have this right now, where will i place the cc?

Code: Select all

mail ("{$_POST['to']}", "Greetings",$body, "From: {$_POST['email']} ");


thanks

User avatar
ruturajv
php-forum Super User
php-forum Super User
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India
Contact:

Postby ruturajv » Wed Mar 16, 2005 8:29 pm

add a header
Cc: emailaddress@email.com
separate the headers by \r\n

User avatar
relicviper
New php-forum User
New php-forum User
Posts: 21
Joined: Tue Apr 22, 2003 10:02 pm
Location: South Africa, JHB
Contact:

Postby relicviper » Wed Mar 16, 2005 11:57 pm

it will make life hell of a lot easier if you have all the header info in variable

Code: Select all

$header = "From: {$_POST['email']}\r\n";
$header. = "Cc: {$_POST['ccemail']}\r\n";

mail ("{$_POST['to']}", "Greetings",$body, $header);


but that is just me :p

User avatar
Alexej Kubarev
Site Admin
Site Admin
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län
Contact:

Postby Alexej Kubarev » Thu Mar 17, 2005 12:32 am

Actually its what everyone does... everyone who is smart enough for that :)

User avatar
planketa
New php-forum User
New php-forum User
Posts: 152
Joined: Mon Mar 08, 2004 12:29 am
Location: Philippines

Postby planketa » Sun Mar 20, 2005 4:22 pm

thanks guys, again your are so helpfull


Return to “PHP coding => Mail”

Who is online

Users browsing this forum: No registered users and 1 guest