Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined index: REMOTE_ADDR #4

Closed
robertvanroon opened this issue Oct 13, 2020 · 2 comments
Closed

Undefined index: REMOTE_ADDR #4

robertvanroon opened this issue Oct 13, 2020 · 2 comments

Comments

@robertvanroon
Copy link

Hi!

First things first. Thanks for the contactform!

I cannot get it to submit though:

[13-Oct-2020 12:41:47 UTC] PHP Notice: Undefined index: REMOTE_ADDR in /home/sol/public_html/contact/submit.php on line 20

And I think consequently contactform errors out:

An error occurred while trying to send your message: SMTP Error: Could not connect to SMTP host.

Hope you can help me with this error, my php knowledge is minimal.

Thxs!

Best,

Robert

@FPSUsername
Copy link

All I can say is to check your SMTP settings. It works fine on the default set ports using a gmail account.

@Grendel7
Copy link
Contributor

I'm sorry for the delay.

PHP Notice: Undefined index: REMOTE_ADDR in /home/sol/public_html/contact/submit.php on line 20

REMOTE_ADDR is a default PHP server variable which contains the IP address of the client. Apparently, your server environment doesn't provide that value. Perhaps the value can be made optional in the code, but this value not existing is highly unusual.

An error occurred while trying to send your message: SMTP Error: Could not connect to SMTP host.

Please verify your SMTP hostname and port are correct, and that there is no firewall or whatnot blocking access to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants