io.kent Posted March 18, 2013 Report Share Posted March 18, 2013 <?php function mass_mail ( $emails, $subject, $body ) { if ( ini_get ( 'SAFE_MODE' ) ) { set_time_limit (0); }; $file['email'] = file ( $emails ); foreach ( $file['email'] as $eline => $email ) { $mail = @mail ( trim ( $email ), $subject, $body, 'From: ' . trim ( $email ) ); $function = array ( 'status' => array ( 'failed' => 'Failed ', 'complete' => 'Complete ' ) ); if ( !$mail ) { print $eline . ') ' . $email . ' || ' . date ( 'h:i a' ) . ' || ' . $function['status']['failed']; } else { print $eline . ') ' . $email . ' || ' . date ( 'h:i a' ) . ' || ' . $function['status']['complete']; }; ob_flush(); flush (); }; }; mass_mail ( 'emails.txt', 'Hello...', 'Type in mesage what you whant send...' ); ?> Quote Link to comment Share on other sites More sharing options...