PHP mail fonksiyonu çalışmıyor

3 Cevap php

I have written a basic script for the mail functionality. I am trying to run this script through WAMP server.

<?php
phpinfo();

$to = "mss@xyz.com";
$subject = "Test mail";
$message = "Hello! This is a simple email message.";
$from = "mohan.s@xyz.com";
$headers = "From: $from";
$res= mail($to,$subject,$message,$headers);
echo " $res Mail Sent.";
?>

I have set the SMTP, sendmail_from in the php.ini file . It gives me the following error

Warning: mail() [function.mail]: Failed to connect to mailserver at "mucse409.eu.xyz.com" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\email.php on line 9 Mail Sent.

Benim makineden SMTP adresini ping mümkün duyuyorum. Lütfen bana yol.

3 Cevap

Bu eğitimde ardından ben posta göndermek başardı.

link text

Ayrıca MS Outlook ya da Mozilla Thunderbird gibi bazı posta istemcisi kullanarak bu smtp sunucuya bu makineden mail gönderebilir miyim?

Benim sağlayıcı blok trafik dışında virüs enfeksiyonu nedeniyle SMTP limanlarda yönetti, ve ben bu nedenle posta göndermek olamazdı, ama sunucu ve port ping verebilecek kez bir sorun vardı.

Bir güvenlik duvarı ya da böyle tarafından bloke edilebilir.

(Eğer bu yazılım yoksa, size macun indirebilirsiniz) Telnet ile bağlantı noktası 25 açabilirsiniz görmek