• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

Failed to connect to mailserver

LauPasq

New Pleskian
Hi,

I tried to access to my mail server via port 25 from my PC with a php script, and it always failed with answer "SMTP: Failed to connect socket"
My server is on Plesk 11.5 and uses postfix as mail server.
Nothing appears in the logs (no connection attempts).

When I try with telnet, there is a connection (appear in log file), but I do not succeed to authenticate.
Any SSL protection ?

How to proceed ?

my Php sript :
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'auth' => true,
'username' => $username,
'password' => $password));

$mail = $smtp->send($to, $headers, $body);

if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}

Thanks a lot for any help
 
Back
Top