Mail errors with PHP5.4

My config file is set correctly, with no mention of localhost, and yet when I send an email I get:-

mail(): Failed to connect to mailserver at “localhost” port 25, verify your “SMTP” and “smtp_port” setting in php.ini

The relevant part of php.ini is:

[mail function]
; For Win32 only.
smtp = relay.advantage.co.nz
smtp_port = 25

There are no stray php.ini files on the server. Localhost is not selected on the IIS SMTP E-Mail settings.
Where is it getting the localhost from?

Did you edit the right php.ini file? Otherwise i dont have a direct answer but i would use PHPMailer.

The answer is that smtp has to be in upper case. SMTP woks.
Thanks for your comment.

Sponsor our Newsletter | Privacy Policy | Terms of Service