Hello,
I need a contact form on my website, that will send to my email address what the visitor enter in the form fields. The problem is that I can't run any php scripts.. is there a way to use some html form?
Hello,
I need a contact form on my website, that will send to my email address what the visitor enter in the form fields. The problem is that I can't run any php scripts.. is there a way to use some html form?
Good summary so far: cannot run server-side PHP, offered the client-mail route, and correctly warned about the usability and reliability problems that follow. Two practical, modern paths remain: a hosted form service you embed on the page, or a lightweight serverless endpoint that accepts the form and forwards email.
Hosted form services (Formspree, FormSubmit, JotForm, Typeform, Google Forms and similar) are the fastest route. They provide an embeddable form or a short snippet, handle delivery, storage, and basic spam protection, and usually have free tiers. Pros: no server code, quick setup, built-in notifications. Cons: third‑party storage, limits on free plans, and some loss of control over deliverability and branding.
If control and deliverability matter, a serverless approach is a good middle ground. Use a provider that supports serverless functions (Netlify, Vercel, Cloudflare Workers) to receive POSTs, then call a transactional email API (SendGrid, Mailgun, Postmark) to send. This needs a small function instead of full hosting, gives you SPF/DKIM control and better spam-handling options, and scales without managing a dedicated server.
Practical checklist and cautions: add a honeypot or CAPTCHA to reduce spam; validate inputs server-side (never trust client-only checks); use HTTPS; verify sending domains (SPF/DKIM) to avoid messages landing in spam; provide a clear privacy notice and consent checkbox for collected data (GDPR). Test across browsers and devices, confirm notification emails arrive (and check spam), and add a thank-you redirect or page to prevent duplicate submissions.
If no third-party or serverless options are possible, showing a plain contact email remains the fallback, but expect lower conversion and more manual handling.
Jump to Post— stymiee 111Yes, but the form will not be pretty as you can't modify the sent data in any way:
<form action=mailto:your@email.address method="POST" enctype="text/plain">
Jump to Post— MattEvans 473:stymiee>
<form action=mailto:your@email.address method="POST" enctype="text/plain">>_< messy and it's not just a case of being unable to modify data : most browsers will dump you to a default mail client (if one exists) with (at best) the form data in the message body. (assuming that that default mail client …
Yes, but the form will not be pretty as you can't modify the sent data in any way:
<form action=mailto:your@email.address method="POST" enctype="text/plain"> :stymiee> <form action=mailto:your@email.address method="POST" enctype="text/plain"> >_< messy and it's not just a case of being unable to modify data : most browsers will dump you to a default mail client (if one exists) with (at best) the form data in the message body. (assuming that that default mail client is even configured to send mail) the user then has to go click 'send' themselves; that is convolution to the max. at worst, the browser will spit an error, or won't do anything.
if you want to be sure that most users will be able to use your form, get a better hosting provider. if there's some legitimate reason why just ONE hosting provider that you're using won't let you access any kind of server-side script, and you need to keep a site with that hosting provider.. rent one that does let you write script, and use that one solely to send the mail.
<b>Welcome to </b>
...
<form action="" method="POST" enctype="text/plain">
...
</form> I'll rent you a one-function script on one of my domains if you're desperate...
Otherwise, you're probably better off just writing your email address on the page and asking people to email you the information if they feel like it. That's pretty much what action=mailto equates to.
Remember, they said they don't have access to PHP. Otherwise a formmail script would have been the obvious choice. :)
Mm. Indeed and agreed. but it's probably worthwhile listing all of the drawbacks of mailto: actions; rather than a simple script somehere ( not neccessarily on the same server where the site is hosted ).
When I had a similar problem ( sendmail blocked ) with some dodgy cheap hosting my old employer used; I set up individiual scripts on my own private full-featured hosting package to handle email forms for clients. As far as I know, those scripts are still in-use...
Perhaps I should start running a third-party service... Set up an account for some silly price like £10 for life ( guaranteed for five years ), and use your own private mailto script, with configurable IP-blocking and a timed IP lock and referer check to protect againt automatic mailbombing... I'm sure such things exist already, but I can't seem to find them by perusing.. It'd almost be money for nothing. ( disapears to plan ).
Thank you for your suggestions! I found a site that offers remotely hosted contact forms, www.emailmeform.com . Basically, I paste the html code in my website, and it calls the php script on their server who sends the email.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.