Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #10712

    Hi,

    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

    #69083

    Hey!

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

    Best regards,

    Peter

    #69084

    Hey!

    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.

    #69085

    The problem is following code in php.ini:

    [mail function]
    ; For Win32 only.
    ; http://php.net/smtp
    SMTP = localhost
    ; http://php.net/smtp-port
    smtp_port = 25

    ; For Win32 only.
    ; http://php.net/sendmail-from
    ;sendmail_from = postmaster@localhost

    ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
    ; http://php.net/sendmail-path
    ;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.

    #69086

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

    #69087

    Hi!

    Great.

    Setting this to resolved.

    Regards,

    Mya

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

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