// include phpmailer library, download from here http://phpmailer.worxware.com/
require("phpmailer.inc.php");
// then you need to read file, i assume there are emails in one line and you dont have names.
$emails = file('emails.txt', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
// Start building email
$mail = new phpmailer;
$mail->IsMail();
$mail->From = "youremail.com";
$mail->FromName = "Your name";
$mail->IsHTML(true);
$mail->Subject = "Your Subject";
$mail->Body = "Your message here";
// start a loop
foreach ($emails as $email) {
if(!empty($email){
// send email one by one
$mail->AddAddress($email);
$mail->Send();
$mail->ClearAddresses();
// lets sleep for 2 seconds before sending next email
sleep(2);
}
}