st0rmer Posted October 25, 2007 Share Posted October 25, 2007 I have a text document with a few of my friends emails on it. I want to send an email to all their emails in one go How would i go about sending multiple emails? Quote Link to comment https://forums.phpfreaks.com/topic/74767-solved-multiple-email-send/ Share on other sites More sharing options...
only one Posted October 25, 2007 Share Posted October 25, 2007 If all of their email adresses are on seperate lines: <?php $message = 'message here..'; $lines = file('file.txt'); foreach ($lines as $line_num => $line) { mail('$line', 'subject', $message); } ?> Quote Link to comment https://forums.phpfreaks.com/topic/74767-solved-multiple-email-send/#findComment-378061 Share on other sites More sharing options...
st0rmer Posted October 26, 2007 Author Share Posted October 26, 2007 Thanks only one! You're a great help Quote Link to comment https://forums.phpfreaks.com/topic/74767-solved-multiple-email-send/#findComment-378472 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.