Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once("mailer/class.phpmailer.php");
- require_once("mailer/class.smtp.php");
- $mail = new PHPMailer();
- $mail->IsSMTP(); // telling the class to use SMTP
- $mail->SMTPSecure = false;
- $mail->Host = "mail.xxx.cz";
- $mail->SMTPAuth = true;
- $mail->SMTPKeepAlive = true;
- $mail->Port = 587;
- $mail->Username = "michal@mail.xxx.cz";
- $mail->Password = "TEST";
- $mail->SMTPDebug = 3;
- $mail->FromName = "Michal";
- $mail->From = "michal@mail.xxx.cz";
- $mail->Subject = "Newsletter";
- $mail->AltBody = "To view the message, please use an HTML compatible email viewer!";
- $mail->MsgHTML("testing");
- $mail->AddAddress("filfareu@gmail.com");
- if(!$mail->Send()) {
- echo $mail->ErrorInfo;
- exit;
- }
- echo "Message has been sent";
- ?>
- 2016-01-08 12:03:35 Connection: opening to mail.xxx.cz:587, timeout=300, options=array (
- )
- 2016-01-08 12:03:35 Connection: opened
- 2016-01-08 12:03:35 SERVER -> CLIENT: 220 vm1xxxx ESMTP Postfix (Ubuntu)
- 2016-01-08 12:03:35 CLIENT -> SERVER: EHLO blog.xxx.cz
- 2016-01-08 12:03:35 SERVER -> CLIENT: 250-vm1xxxx
- 250-PIPELINING
- 250-SIZE 10240000
- 250-VRFY
- 250-ETRN
- 250-ENHANCEDSTATUSCODES
- 250-8BITMIME
- 250 DSN
- 2016-01-08 12:03:35 SMTP Error: Could not authenticate.
- 2016-01-08 12:03:35 CLIENT -> SERVER: QUIT
- 2016-01-08 12:03:35 SERVER -> CLIENT: 221 2.0.0 Bye
- 2016-01-08 12:03:35 Connection: closed
- 2016-01-08 12:03:35 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
- SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement