Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'phpmailer/class.phpmailer.php';
- require 'phpmailer/class.smtp.php';
- $mail_info = mssql_query("SELECT TOP 1 mail FROM mail where used = 0");
- $mail_info = mssql_fetch_assoc($mail_info);
- $mail_info = $mail_info['mail'];
- $mail_info = "igors@webmaking.lv";
- $subject = "EasyMu.biz Medium x1000 - 15 February";
- $mail = new PHPMailer;
- $mail->IsSMTP(); // Set mailer to use SMTP
- $mail->SMTPDebug = 2;
- $mail->Host = 'smtp.gmail.com'; // Specify main and backup server
- $mail->Port = 587; // Set the SMTP port
- $mail->SMTPAuth = true; // Enable SMTP authentication
- $mail->Username = 'easymu.biz@gmail.com'; // SMTP username
- $mail->Password = 'roteiro2'; // SMTP password
- $mail->SMTPSecure = 'tls';
- $mail->CharSet = 'UTF-8';
- $mail->From = 'easymu.biz@gmail.com';
- $mail->FromName = 'EasyMu.biz';
- //$mail->AddAddress('igors@webmaking.lv', 'Igors WebMaking.Lv'); // Add a recipient
- $mail->AddAddress($mail_info); // Name is optional
- $mail->IsHTML(true); // Set email format to HTML
- $mail->Subject = $subject;
- $mail->Body = "";
- //$mail->AltBody = $_POST['textarea'];
- if(!$mail->Send()) {
- // echo 'Message could not be sent.';
- // echo 'Mailer Error: ' . $mail->ErrorInfo;
- // exit;
- // $this->flashMessageContainer->add('');
- echo "Mail send. :)";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement