Click here to Skip to main content
15,878,048 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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?


What I have tried:

Checked for other copies of php.ini, searched for localhost in relevant files.
Posted
Updated 28-Oct-19 22:24pm

1 solution

The documentation (PHP: Runtime Configuration - Manual[^]) and the error message, both show "SMTP" in upper case.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900