Hey all,
I am trying to setup the mail() function in PHP.
My php.ini file contains:
[mail function]
SMTP = localhost
smtp_port = 25
sendmail_from = postmaster@localhost
mail.add_x_header = Off
How should it be configured to allow the mail function to work correctly?
Thanks,
shanet
I'm on windows. My mail command is as follows:
mail("(my email address)", "SUBJECT", "You have been sent an email.", "FROM: (My email address").
It gives 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 C:\xampp\htdocs\mail.php on line 2
I am trying to setup the mail() function in PHP.
My php.ini file contains:
[mail function]
SMTP = localhost
smtp_port = 25
sendmail_from = postmaster@localhost
mail.add_x_header = Off
How should it be configured to allow the mail function to work correctly?
Thanks,
shanet
I'm on windows. My mail command is as follows:
mail("(my email address)", "SUBJECT", "You have been sent an email.", "FROM: (My email address").
It gives 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 C:\xampp\htdocs\mail.php on line 2