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? 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); } ?> 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 Link to comment https://forums.phpfreaks.com/topic/74767-solved-multiple-email-send/#findComment-378472 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.