Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By zvepro on
I wrote a progamm in php to send mail using the mail() function and got the message
"Warning: 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 c:\program files\easyphp1-7\www\spinyo\homepage.php on line 18
"
I checked the php.ini file and the smtp is configured to localhost but can't find the smtp_port configurations.What should I do to enable this configuration
Comments
use ini_set('smtp_port',25);
use
ini_set('smtp_port',25);
it should work. or check the port using echo php_info(); to know your port.
phpinfo() not php_info()
"echo php_info();" seems to be wrong. Use:
"echo phpinfo();"