Advertisement
Guest User

Untitled

a guest
Aug 29th, 2017
543
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.74 KB | None | 0 0
  1. <?php
  2. require 'phpmailer/PHPMailerAutoload.php';
  3. $mail = new PHPMailer;
  4. $mail->isSMTP();
  5. $mail->SMTPDebug = 2;
  6. $mail->Debugoutput = 'html';
  7. $mail->CharSet = "UTF-8";
  8. $mail->Host = 'smtp.gmail.com';
  9. $mail->Port = 465;
  10. $mail->SMTPSecure = 'ssl';
  11. $mail->SMTPAuth = true;
  12. $mail->Username = "";
  13. $mail->Password = "";
  14. $mail->setFrom('noreply.verona@gmail.com', 'Verona Consulting');
  15. $mail->addAddress('wojciech.mazur@veronaconsulting.pl', 'Wojciech Mazur');
  16. $mail->Subject = 'Raport Weryfikacja Janków - '.date("d.m.Y");
  17. $mail->msgHTML(file_get_contents('views/v_report_dkj_ver.php'), dirname(__FILE__));
  18. $mail->AltBody = 'TEST';
  19. if (!$mail->send()) {
  20.     echo "Mailer Error: " . $mail->ErrorInfo;
  21. } else {
  22.     echo "Message sent!";
  23. }
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement