If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.
March 26, 2012 at 4:14 am #10712
I am getting an error when someone tries to send a message through the contact page. the error is as follows:
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 E:webhandsonswp-contentthemesdisplaysend.php on line 74.
My host does not allow me to do anything with the php.ini file so I am not sure what to do. I’m not a PHP programmer, although I believe I have the setup configured correctly. I”m not sure what to do with the send.php file. I’ve looked at it, but I didn’t see any settings or anything to change in there nor do I know what to do with ini_set().
thanks in advance for any help you can giveMarch 26, 2012 at 7:13 am #69083
Did you contact your hoster? It seems like php can’t connect to the mail server.
PeterMarch 27, 2012 at 1:52 pm #69084
I sure did and they sent me to you. They were the ones that told me that the php.ini file was a global file that wasn’t editable by me. What I am trying to find out is where exactly the setting is that is trying to use LocalHost as the SMTP server? I’ve been through every setting I can find, but found nothing that is helpful.March 28, 2012 at 6:31 am #69085
The problem is following code in php.ini:
; For Win32 only.
SMTP = localhost
smtp_port = 25
; For Win32 only.
;sendmail_from = postmaster@localhost
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path = ""C:xamppsendmailsendmail.exe" -t"
PHP requires a proper configuration otherwise the standard mail() function will not work. I’m no expert when it comes to the server configuration but imho it’s up to your hoster to provide a solution for this problem. At the moment you (and probably all other customers of your hoster) can’t send any mails via php because this function simply doesn’t work because of the (wrong?) configuration.March 28, 2012 at 2:19 pm #69086
thank you. I think you’ve given me enough insight to attack the problem from some other angles.March 28, 2012 at 7:23 pm #69087
The topic ‘error when sending a message though contact page’ is closed to new replies.