Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Mail

Carbon Copy

the mail() function

Moderators: macek, egami, gesf

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
planketa
New php-forum User
New php-forum User
 
Posts: 152
Joined: Mon Mar 08, 2004 12:29 am
Location: Philippines

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

add a header
Cc: emailaddress@email.com
separate the headers by \r\n
User avatar
ruturajv
php-forum Super User
php-forum Super User
 
Posts: 1280
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India

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
relicviper
New php-forum User
New php-forum User
 
Posts: 21
Joined: Tue Apr 22, 2003 10:02 pm
Location: South Africa, JHB

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

Actually its what everyone does... everyone who is smart enough for that :)
User avatar
Alexej Kubarev
Site Admin
Site Admin
 
Posts: 2223
Joined: Fri Mar 05, 2004 7:15 am
Location: Täby, Stockholms län

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

thanks guys, again your are so helpfull
User avatar
planketa
New php-forum User
New php-forum User
 
Posts: 152
Joined: Mon Mar 08, 2004 12:29 am
Location: Philippines


Return to PHP coding => Mail

Who is online

Users browsing this forum: No registered users and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.