reflex84 Posted March 18, 2010 Share Posted March 18, 2010 Hi,What do I put in my php form code, so that when someone fills in my online form, the form goes to more than, example 5 email addresses?Heres what my coding looks like: $to = "me@xxxxxxxxxxxx.com"; $bcc = "me@xxxxxxxxxxxx.com"; $from = $_POST['email']; $subject = "Website Enquiry"; As you can see, I've got a $bcc for a second email address, but how do I bcc more than email addresses?I tried: $bcc = "me@xxxxxxxxxxxx.com; me@xxxxxxxxxxxx.com; me@xxxxxxxxxxxx.com"; ... and this didn't workAny help? Link to comment Share on other sites More sharing options...
real_illusions Posted March 18, 2010 Share Posted March 18, 2010 $to = "youremail@example.com";$headers = "From: " . $_POST['email'] . "\r\n"; $headers .= "bcc: someoneelse@example.com" . "\r\n";$headers .= "bcc: anotherperson@example.com" . "\r\n"; Hope that helps Link to comment Share on other sites More sharing options...
justsomeguy Posted March 18, 2010 Share Posted March 18, 2010 Only 1 BCC header is allowed. When in doubt, go to the source, this document tells you exactly how to format anything in an email:http://www.ietf.org/rfc/rfc2822.txtIf you search for "bcc" you'll find the description about that header, which takes an "address-list" (which you can also find defined in that document). Link to comment Share on other sites More sharing options...
real_illusions Posted March 18, 2010 Share Posted March 18, 2010 Only 1 BCC header is allowed.Didn't know that Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.