PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
aalbright
Forum Newbie
Posts: 6 Joined: Sun Feb 15, 2009 8:32 pm
Post
by aalbright » Tue Mar 10, 2009 8:35 pm
Code: Select all
1. <?php
2. $to = "you@yoursite.com";
3. $subject = "Contact Us";
4. $email = $_REQUEST['email'] ;
5. $message = $_REQUEST['message'] ;
6. $headers = "From: $email";
7. $sent = mail($to, $subject, $message, $headers) ;
8. if($sent)
9. {print "Your mail was sent successfully"; }
10. else
11. {print "We encountered an error sending your mail"; }
12. ?>
Is it possible to add a CC address to this code? Thank you for your help.
requinix
Spammer :|
Posts: 6617 Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA
Post
by requinix » Tue Mar 10, 2009 11:24 pm
Looks like the right place. I wonder if
the manual page has anything to say about it...