0

Hi there,

I have recently installed Apache and PHP on my PC and am trying to run it as a testing server.

After creating a PHP mail() script I receive the following error in my Apache log file:

"PHP Warning: mail() [<a href='function.mail'>function.mail</a>]: Failed to connect to mailserver at &quot;smtp.localhost.com&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\send.php on line 8"

I later discovered that i need a SMTP server. I replaced 'smtp.localhost.com' in my php.ini file with smtp.gmail.com but it still does not work, returning the error:

"PHP Warning: mail() [<a href='function.mail'>function.mail</a>]: SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. p10sm177365gvf.7 in C:\\Program Files\\Apache Software Foundation\\Apache2.2\\htdocs\\send.php on line 8"

Could anyone let me know how to resolve this problem?

I just want to test my PHP mail scripts on my own computer regardless of whether it is online or offline.

Thank you for your support!

1
Contributor
1
Reply
2
Views
9 Years
Discussion Span
Last Post by jaca123
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.