Could someone enlighten me on the role of php.ini file?
I test mail("address@y ahoo.com", "My Subject", "Line 1\nLine 2\nLine
3","From: address@yahoo.c om")
which produces error:
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()
I am trying to play with relevant settings in php.ini
SMTP = localhost
SMTP_PORT = 25
SENDMAIL_FROM = NULL
SENDMAIL_PATH = H:\WINNT\system 32\sendmail.dll
re-booting the PC every time, but changes do not seem to affect the error.
If I delete everything from php.ini the code which extract data from
database and displays it still works, but mail() produces a different error
Warning: mail(): "sendmail_f rom" not set in php.ini or custom "From:" header
missing in ...
Same error happens if I rename php.ini
It looks like PHP works without php.ini and takes some default settings from
elsewhere
Is this correct?
I test mail("address@y ahoo.com", "My Subject", "Line 1\nLine 2\nLine
3","From: address@yahoo.c om")
which produces error:
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()
I am trying to play with relevant settings in php.ini
SMTP = localhost
SMTP_PORT = 25
SENDMAIL_FROM = NULL
SENDMAIL_PATH = H:\WINNT\system 32\sendmail.dll
re-booting the PC every time, but changes do not seem to affect the error.
If I delete everything from php.ini the code which extract data from
database and displays it still works, but mail() produces a different error
Warning: mail(): "sendmail_f rom" not set in php.ini or custom "From:" header
missing in ...
Same error happens if I rename php.ini
It looks like PHP works without php.ini and takes some default settings from
elsewhere
Is this correct?
Comment