Skip to content
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.

POST is not allowed #32

Open
mjkofler opened this issue Jul 16, 2021 · 2 comments
Open

POST is not allowed #32

mjkofler opened this issue Jul 16, 2021 · 2 comments

Comments

@mjkofler
Copy link

Hi! Thanks for providing this helpful code. I got the recaptcha and everything else (I think) working, but when I click 'send' it gives an error (in red font with a pink background) below the form on the webpage that says

POST is not allowed

The javascript console says:
Failed to load resource: the server responded with a status of 405 (Method Not Allowed)
http://127.0.0.1:62140/content/JeBf4dQBRMV_M_PMAAAG/4G4FdfW/S5Rsr7A/3nvbxFg/RRSwf1C/y5u4VNL/w61FBPP/xaTwicQ/library/sendmail.php

I'm testing this on my local machine. I have php installed on macOS BigSur.

I don't see anything obvious in the sendmail.php file that would return this error message. I'm hoping this is something obvious that I'm overlooking!

Please help - thanks!

@mjkofler
Copy link
Author

I moved my site into the apache folder on localhost and opened the site at 127.0.0.1 instead of using DreamWeaver's preview function, which resolved the "POST is not allowed" error. When it click send after filling out the form it now adds a green rectangle below the send button but provides not other feedback. I do not get the info from the form sent to my email as expected. Thoughts?

@jonmbake
Copy link
Owner

The green rectangle indicates the POST request was successful: https://github.com/jonmbake/bootstrap3-contact-form/blob/master/assets/js/contact-form.js#L78. The sendMail script must be returning a 2XX status, but still failing to send for some reason.

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

No branches or pull requests

2 participants