Getting Started

PHPMailer smtp error

I created an email script using phpmailer smtp and receiving this error:

"Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting."

 

i used as :

$mail->SMTPDebug = 0;
$mail->isSMTP();
$mail->Host = 'relay-hosting.secureserver.net';
$mail->Port = 25;
$mail->SMTPAuth = false;
$mail->SMTPSecure = false;

 

_____________________________

Also tried this :

$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'vi******************ket.com'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'contact@vi******************ket.com'; // SMTP username
$mail->Password = 'vi********r@************'; // SMTP password
$mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 25; // TCP port to connect to

_______________________

Plz Help...