I got this warning after using the mail function. It seem not to be configure at the php.ini does anybody has any idea on how to fix it.
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:\wamp\www\step2.php on line 14
You need a mail server to be able to send mail. If you’re not going to run one on your own computer, then you need to put the details of the SMTP server you’ll use in your php.ini.
Will have to get a gmail acouunt? I have one already.
will the configuration below go inside the php.ini?
smtp.gmail.com (use authentication)
Use Authentication: Yes
Port for TLS/STARTTLS: 587
Port for SSL: 465
php.ini
[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25 smtp.gmail.com (use authentication)
Use Authentication: Yes
Port for TLS/STARTTLS: 587
Port for SSL: 465
Warning: mail() [function.mail]: Failed to connect to mailserver at “smtp.gmail.com” port 25, verify your “SMTP” and “smtp_port” setting in php.ini or use ini_set() in C:\wamp\www\step2.php on line 19
Can ask my host provider for the DNS server, or am I missing something else in the code?
I have used the toturial below and he talks about getting an DNS server, or ISP but I don’t know where to find those tools to make it work. I have asked my domain host server and they give me mail.domainname.com as the DNS server but that’s what I need for this purpose?