Advertisement
Guest User

Untitled

a guest
May 12th, 2017
579
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.16 KB | None | 0 0
  1. send_test();
  2.  
  3.  
  4. function send_test() {
  5.     $today = date("F j, Y");
  6.     $mail = new PHPMailer();  // the true param means it will throw exceptions on errors, which we need to catch
  7.     $mail->CharSet = 'UTF-8';
  8.     $mail->Host = "imap.gmail.com"; // SMTP server
  9.     //$mail->IsSMTP();
  10.     $mail->Username = "notifications@telusinternational.com"; // SMTP server
  11.     $mail->Password = "Tr@nsact3l2013"; // SMTP server
  12.     $mail->From = "notifications@telusinternational.com"; // SMTP server
  13.     $mail->Port = 25;
  14.    
  15.    
  16.        
  17.     $mail->Body = "<html>
  18.             <body>
  19.                <div>
  20.                     <p>Test</p>    
  21.                </div>
  22.              
  23.            </body>
  24.            </html>";
  25.    
  26.     $mail->addAddress("carlos.recinos@telusinternational.com");
  27.    
  28.     $mail->IsHTML(true);
  29.    
  30.     $mail->SetFrom('notifications@telusinternational.com', 'AD Global Scanner');
  31.    
  32.     $mail->Subject = "subject";
  33.    
  34.    echo $mail->Body;
  35.    
  36.  
  37.     if (!$mail->Send()) {
  38.         echo "Message was not sent";
  39.         echo "Mailer Error: " . $mail->ErrorInfo;
  40.         //exit;
  41.     } else {
  42.         echo "Message was sent";
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement