Send Mail PHP File

Hi.

I have been struggling with something recently. I am creating my Contact Page

example.com/contact

I am using custom HTML. I added a PHP file (send-mail.php) to the root of my website via FTP.

Well, for the form itself, the form action points to the file “send-mail.php”. When I click on the submit button in the form, it is suppose to link directly to “example.com/send-mail.php” for processing but it doesn’t. Instead, it links to “example.com/contact/send-mail.php”.

How do I fix this?

I have looked around for a folder “contact” to add the “send-mail.php” file via FTP but I don’t seem to be lucky.

Please help.

Thank you!

Hi Barry,

Thanks for reaching out.

The form action should point to the absolute path, example //example.com/send-mail.php instead of just send-mail.php. I also recommend using a form plugin for the purpose of the contact page, like Contact Form 7.

Please note we can’t provide custom development or support for any customization in the forum. I recommend using a plugin instead of hard-coding it :slight_smile:

Thanks!

:open_mouth:

It’s working now. I didn’t add the double slash (//) before when I tried example.com/send-mail.php.

I prefer doing most of these stuffs with custom HTML and CSS so as to reduce the plugins load on my website.

Thanks.

:grinning:

Glad it’s working now, and you’re most welcome!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.