I am trying to use php-mailer-class but getting different issue.
Please take a look on my code.
include ("class.phpmailer.php");
$mail = new PHPMailer(); // create a new object
$mail->IsSMTP(); // enable SMTP
$mail->SMTPDebug =1; // debugging: 1 = errors and messages, 2 = messages only
//$mail->SMTPAuth = true; // authentication enabled
$mail->Host = 'relay-hosting.secureserver.net';
$mail->Port = 25;
$mail->Username = "admin@****.in";
$mail->Password = "******";
$mail->SetFrom('*****0014@gmail.com', 'User name');
$mail->Subject = 'mailing';
$mail->Body = "<b>Hi, your e- mail has been received.</b>";
$mail->AddAddress("*****0014@gmail.com");
if(!$mail->Send()) {
$error = 'Mail error: '.$mail->ErrorInfo;
return false;
} else {
$error = 'Message sent!';
return true;
}
errors-:
SMTP -> ERROR: EHLO not accepted from server:
SMTP -> ERROR: HELO not accepted from server:
SMTP -> NOTICE: EOF caught while checking if connectedThe following From address failed: *****0014@gmail.com
This code is working well if I am using Gamil settings Not working with godaddy SMTP settings.