Adam Posted June 5, 2008 Share Posted June 5, 2008 I've never needed to do this before so I'm having a few problems, but I have a list of email addresses like so.. "email@1, email@2, etc.." They are posted through the form with the name of the field as "sendTo". Fine so far, but I'm trying to send them all in one email rather than looping through them and sending one at a time. I've put the contacts in the Bcc header like so.. (I've removed my validation and what not from this code).. $subject = $_POST['subject']; $message = $_POST['message']; $contacts = $_POST['sendTo']; $headers = 'From: MiniMerc <noreply@minimerc.co.uk>' ."\r\n"; $headers .= 'Bcc: ' .$contacts. "\r\n"; $sendMail = mail('noreply@minimerc.co.uk', $subject, $message, $headers); I've been then running a conditional on the $sendMail var to find out if its been sent, and it keeps saying it has, but no email, not even spam in the spam.. Can anybody see something I've done wrong or.. provide any help? Cheers! Quote Link to comment https://forums.phpfreaks.com/topic/108849-sending-email-with-php/ Share on other sites More sharing options...
fanfavorite Posted June 5, 2008 Share Posted June 5, 2008 can you echo the headers var and show us how it displays. could be a problem with the contacts variable. Quote Link to comment https://forums.phpfreaks.com/topic/108849-sending-email-with-php/#findComment-558376 Share on other sites More sharing options...
Adam Posted June 5, 2008 Author Share Posted June 5, 2008 Tx: Mailling List From: MiniMerc Bxc: removed@gmail.com, removed@aol.com .... is the echo'd headers variable - Cheers! Quote Link to comment https://forums.phpfreaks.com/topic/108849-sending-email-with-php/#findComment-558384 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.