the mail() function
Moderators: macek, egami, gesf
by 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
-

planketa
- New php-forum User

-
- Posts: 152
- Joined: Mon Mar 08, 2004 12:29 am
- Location: Philippines
by ruturajv » Wed Mar 16, 2005 8:29 pm
add a header
Cc:
emailaddress@email.com
separate the headers by \r\n
-

ruturajv
- php-forum Super User

-
- Posts: 1280
- Joined: Sat Mar 22, 2003 9:42 am
- Location: Mumbai, India
-
by 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
-

relicviper
- New php-forum User

-
- Posts: 21
- Joined: Tue Apr 22, 2003 10:02 pm
- Location: South Africa, JHB
by planketa » Sun Mar 20, 2005 4:22 pm
thanks guys, again your are so helpfull
-

planketa
- 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 1 guest