NathanLedet Posted July 7, 2008 Share Posted July 7, 2008 I'm wondering if this is possible... $to = //Script here to retrieve multiple e-mails from database $subject = "You have mail"; $message = "This is the message"; $headers = "MIME-Version: 1.0\n"; $headers .= "Content-type: text/html; charset='iso-8859-1'\n"; mail($to,$subject,$message,$headers); and it needs to send the same e-mail to multiple people. Thanks for any advice Quote Link to comment Share on other sites More sharing options...
ag3nt42 Posted July 7, 2008 Share Posted July 7, 2008 yea thats possible.. throw the script into a for loop..or while loop... base it on a count of how many emails are in the DB.. Quote Link to comment Share on other sites More sharing options...
NathanLedet Posted July 7, 2008 Author Share Posted July 7, 2008 What's the difference in for, foreach, while? Quote Link to comment Share on other sites More sharing options...
discomatt Posted July 7, 2008 Share Posted July 7, 2008 Check the manual. Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted July 8, 2008 Share Posted July 8, 2008 I suggest you check out Wez Furlong's talk "PHP: Best Mailing Practices" Audio Slides Ken Quote Link to comment Share on other sites More sharing options...
NathanLedet Posted July 8, 2008 Author Share Posted July 8, 2008 I suggest you check out Wez Furlong's talk "PHP: Best Mailing Practices" Audio Slides Ken Great reply. Thank you, I appreciate it! Check the manual. Not so much. Quote Link to comment Share on other sites More sharing options...
dannyb785 Posted July 8, 2008 Share Posted July 8, 2008 Yes, your original script should be fine. Just make sure the emails are separated by, I believe, a comma. I would think it's better to do it that way than do a loop and use the mail() function over and over(but I dont know for sure) Quote Link to comment 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.