I'm Trying to send email via php by using php mailer, but it's showing SMTP connect() failed. here is my code. can't find out what is problem in that. if somebody help to track error it will be very helpful for me.
$mail = new PHPMailer;
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'dds.uemtv.com'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = '[email protected]'; // SMTP username
$mail->Password = 'pssword'; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 587; // TCP port to connect to
$mail->setFrom('[email protected]', 'title');
$mail->addReplyTo($email, '$name');
$mail->addAddress($email); // Add a recipient
//$mail->addCC('[email protected]');
//$mail->addBCC('[email protected]');
$mail->isHTML(true); // Set email format to HTML
$bodyContent = '<h1>Your Registration Completed. </h1>'
$mail->Subject = 'Verify Account- Rozgar';
$mail->Body = $bodyContent;
if(!$mail->send()) {
echo $data->msg = $mail->ErrorInfo;
} else {
// echo 'Message has been sent';
echo $data->msg="Please Verify Your Email Address";
}
Showing this error.
2017-06-07 05:36:44 SERVER -> CLIENT: 220-dds.uemtv.com ESMTP Exim 4.89 #1 Wed, 07 Jun 2017 10:36:40 +0500 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.
2017-06-07 05:36:44 CLIENT -> SERVER: EHLO localhost
2017-06-07 05:36:44 SERVER -> CLIENT: 250-dds.uemtv.com Hello localhost [182.186.132.245] 250-SIZE 52428800 250-8BITMIME 250-PIPELINING 250-STARTTLS 250 HELP
2017-06-07 05:36:44 CLIENT -> SERVER: STARTTLS
2017-06-07 05:36:45 SERVER -> CLIENT: 220 TLS go ahead
2017-06-07 05:36:46 CLIENT -> SERVER: EHLO localhost
2017-06-07 05:36:47 SERVER -> CLIENT: 250-dds.uemtv.com Hello localhost [182.186.132.245] 250-SIZE 52428800 250-8BITMIME 250-PIPELINING 250-AUTH PLAIN LOGIN 250 HELP
2017-06-07 05:36:47 CLIENT -> SERVER: AUTH LOGIN
2017-06-07 05:36:47 SERVER -> CLIENT: 334 VXNlcm5hbWU6
2017-06-07 05:36:47 CLIENT -> SERVER: xxx=
2017-06-07 05:36:47 SERVER -> CLIENT: 334 UGFzc3dvcmQ6
2017-06-07 05:36:47 CLIENT -> SERVER: xxx
2017-06-07 05:36:49 SERVER -> CLIENT: 535 Incorrect authentication data
2017-06-07 05:36:49 SMTP ERROR: Password command failed: 535 Incorrect authentication data
2017-06-07 05:36:49 SMTP Error: Could not authenticate.
2017-06-07 05:36:49 CLIENT -> SERVER: QUIT
2017-06-07 05:36:50 SERVER -> CLIENT: 221 dds.uemtv.com closing connection
2017-06-07 05:36:50 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting