Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #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 give



    Did you contact your hoster? It seems like php can’t connect to the mail server.

    Best regards,




    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.


    The problem is following code in php.ini:

    [mail function]
    ; 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.


    thank you. I think you’ve given me enough insight to attack the problem from some other angles.




    Setting this to resolved.



Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘error when sending a message though contact page’ is closed to new replies.