Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL ^ E_NOTICE);
- ini_set("memory_limit", "64M");
- $fisier_smtps = file("smtps.txt");
- $limit = 0;
- foreach($fisier_smtps as $linie => $valoare)
- {
- print $valoare;
- $cont = explode(":",$cont[0]);
- $parola = explode(":",$parola[1]);
- }
- $server = "smtp.mail.yahoo.com";
- $port = "995";
- $headers = array ('From' => $from,
- 'To' => $to,
- 'Subject' => $subiect);
- $smtp = Mail::factory('smtp',
- array ('host' => $server,
- 'auth' => true,
- 'username' => $cont,
- 'password' => $parola));
- $emails = file("emails.txt");
- $emails_trimise = 0;
- foreach($emails as $linie => $de_trimis)
- {
- $mail = $smtp->send($de_trimis, $headers, $mesaj);
- if (PEAR::isError($mail)) {
- echo("<p>" . $mail->getMessage() . "</p>");
- } else {
- echo("<p>Message successfully sent!</p>");
- }
- $emails_trimise++;
- }
- print "$mailsSent mails was sent...\n";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment