Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require 'PHPMailerAutoload.php';
- $f = file_get_contents("emails");
- $f = explode("\n", $f);
- foreach ($f as $email) {
- $email = explode(":", $email)[0];
- $mail = new PHPMailer;
- $mail->isSMTP();
- $mail->Host = 'smtp.1and1.com';
- $mail->SMTPAuth = true;
- $mail->Username = 'support@confirm-your-account.net';
- $mail->Password = '01274002591';
- $mail->SMTPSecure = 'tls';
- $mail->Port = 587;
- $mail->CharSet = 'utf-8';
- $mail->setFrom('support@souq.com', 'Souq.com');
- $mail->addAddress($email);
- $mail->isHTML(true);
- $mail->Subject = 'تأكيد عملية شراء ﻻبتوب من سوق دوت كوم';
- $mail->Body = file_get_contents("test2.html");
- if(!$mail->send()) {
- echo 'Message could not be sent.';
- echo 'Mailer Error: ' . $mail->ErrorInfo;
- } else {
- echo $email . ' => Message has been sent' . "\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement