Hi guys,
I use the latest version directly and send mail via gmail.
I installed plesk to try on the same server and mail went fine.
I installed Directadmin and try again, mail is not going.
Error: SMTP -> ERROR: Could not connect to server: Network cannot be accessed (101)
I use the latest version directly and send mail via gmail.
I installed plesk to try on the same server and mail went fine.
I installed Directadmin and try again, mail is not going.
Error: SMTP -> ERROR: Could not connect to server: Network cannot be accessed (101)
PHP:
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->SMTPDebug = 1;
$mail->SMTPAuth = true;
$mail->SMTPSecure = 'ssl';
$mail->Host = "smtp.gmail.com";
$mail->Port = 465;
$mail->IsHTML(true);
$mail->SetLanguage("tr", "phpmailer/language");
$mail->CharSet ="utf-8";
$mail->Username = "[email protected]";
$mail->Password = "password";
$mail->SetFrom("[email protected]", "Name Surname");
$mail->AddAddress("[email protected]");
$mail->Subject = "M Title";
$mail->Body = "Message";
if(!$mail->Send()){
echo "Error : ".$mail->ErrorInfo;
} else {
echo "Okk";
}