Jump to content

[SOLVED] mail() failure to connect to mailserver


daveh33

Recommended Posts

I have wrote a simple mail script which was working fine - when I moved it to a different server I get the error: -

 

Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in E:\home\project32\sendmessage.php on line 219

 

I tried to add the below code: -

 

ni_set(smtp, "mail.mydomain.com");
ini_set(smtp_port, 25); //25 is the default

 

But it still displays that error message - can anyone help me please!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.