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 Link to comment https://forums.phpfreaks.com/topic/113627-mail/ 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.. Link to comment https://forums.phpfreaks.com/topic/113627-mail/#findComment-583919 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? Link to comment https://forums.phpfreaks.com/topic/113627-mail/#findComment-583969 Share on other sites More sharing options...
discomatt Posted July 7, 2008 Share Posted July 7, 2008 Check the manual. Link to comment https://forums.phpfreaks.com/topic/113627-mail/#findComment-583984 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 Link to comment https://forums.phpfreaks.com/topic/113627-mail/#findComment-584085 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. Link to comment https://forums.phpfreaks.com/topic/113627-mail/#findComment-584705 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) Link to comment https://forums.phpfreaks.com/topic/113627-mail/#findComment-584723 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.