Kindly write a simple code to produce a form, where Subject & Message is displayed and when user clicks on submit button, and e-mail is sent to me, with the same subject as the user mentions. My e-mail address should not be displayed. I've been searching web for more than an hour and 30 minutes and I find the code which when I use on my blog does not work and NOT FOUND ERROR is displayed.
I don't know anything about html.

I'll be very thankful to you.

Dani AI

Generated

This thread shows the right diagnosis but needs a concise, practical roadmap. tried posting an HTML form whose action points to send_mail.php and saw “Method Not Allowed (405)”; as observed, that error and the Blogger environment indicate there’s no server-side script running at the form's target. Plain HTML/JS in a static Blogger page cannot itself deliver mail without an external service or a server to run backend code.

Practical options (pick one):

  • Use Blogger’s built‑in Contact Form gadget (Layout → Add a Gadget → Contact Form). Google hosts the backend and the blog owner’s address is not displayed on the page.
  • Embed a Google Form (or similar survey form) and enable email notifications; responses are stored for review rather than sent as a direct email.
  • Use a “form‑to‑email” third‑party service designed for static sites (they supply a POST endpoint to use as the form action). Many have free tiers for low-volume use but often add branding or a footer.
  • Host a small backend (PHP/Node/Python) on a server or a cloud function that accepts POST, sends mail, and hides the recipient address. This is the classic approach if full control is required.

Quick troubleshooting notes for the 405 you saw: a 405 usually means the target URL either doesn’t exist on a server that can run the script, or the host rejects the HTTP method. Verify the form’s action points to an actual server endpoint that supports POST (not a local file on Blogger), check the browser Network tab to see what URL was requested, and confirm the script is deployed on a real web host.

Security and UX: never expose your mailbox in page HTML; validate and sanitize all inputs server‑side; set the email’s Reply‑To to the submitter rather than forging From; and add spam protection (CAPTCHA or a honeypot). As suggested, third‑party services can be the fastest route when hosting server code is not an option.

Recommended Answers

All 11 Replies

A couple of things I should point out, firstly is that the forums are not designed for you to ask for code to be created, we shall happily give you hints on how to start, and help with debugging if you show your code and the error messages but what the forum is not designed for is for us to write your code.

Secondly, HTML cannot be used to send emails, you shall need to use a server side and be running an email server or be able to connect. PHP, a common server side language has the functionality to send emails and I suggest you look into the following function mail().

Good luck, and by all means return with any specific questions.

blogger.com supports only html, can't I create a feedback form on that?

How to make the following code workable on my blog?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Feedback Form</title>  
</head>
<body>
<h1>Send Us Your Feedback!</h1>
<form action="send_mail.php" method="post">
<table>
<tr>
<td>Email Adress:</td>
<td>
<input type="text" name="email_address" value="" maxlength="100" />
</td>
</tr>
<tr>
<td>Comments:</td>
<td>
&lt;textarea rows="10" cols="50" name="comments"&gt;&lt;/textarea&gt;
</td>
</tr>
<tr><td>&nbsp;</td>
<td>
<input type="submit" value="Submit" />
</td>
</tr>
</table>
</form>
<p>Form code inspired by <a href="">True Fastian.com</a>!</p>
</body>
</html>

Ok, the code you have posted is HTML, although you have a slight error with the following line: &lt;textarea rows="10" cols="50" name="comments"&gt;&lt;/textarea&gt; which should read: <textarea rows="10" cols="50" name="comments"></textarea>

What is the error message you are getting?

It won't be a problem with the HTML but more likely with the 'send_mail.php' file which is a PHP script (server side as mentioned before) which is the core. This is what actually sends the email.

Method Not Allowed

Error 405.

What I want to do is to allow the user to add an ask page to my blog where they can ask questions.
Kindly solve my this big problem.

Can this problem be solved using JAVA SCRIPT?

No, you need some form of server side language, whether you are writing to a relational DB such as MySQL or to a flat file .txt document.

Error 405 is an HTTP response code, and is likely to occur because you cannot use the POST method in your form, which if you say your host shall not allow PHP is to be expected.

I'm sorry but you shall only be able to create a Static Website.

google for free email form services.
There are many, and they usually include an advert for themselves in the email sent. But as it is going to yourslef, that doesn't matter, does it?

They give you a bit of code to stick on your pages.

A service that helps you with forms and emails was mentioned in a forum thrread I read elsewhere today.

http://phpforms.net/

I've not tried it, but for someone who struggles with html and php it might be ideal. There's a free version for a small number of emails per month,

The problem is DrJohn, from the sounds of it his host won't allow the execution of PHP.

Thanks a lot for every one's time.
Now I'd like to ask a general question. What is the sallary of a fresh BScs abroad?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.