It’s not always easy to find the right way how to send an email from a static HTML page with google sheets.
However, you might be tempted just to use your regular Gmail account to send messages from your website.
But that can quickly lead to problems if you’re trying to send a lot of messages at once.
Google Sheets service is the perfect solution for this issue. It offer easy ways to send email address without using any special software or server side language.
So, with a few simple steps, you can have your website send emails automatically.
In this short step by step guide, I’ll show you the easy and exact ways to send email from your static web page.
How to send an email from a static HTML page with Google sheets step by step
1. First thing to do is, click on the following link:
2. The spreadsheet will appear in front of you.
3. If you like, you change the name of the file.
4. Click on Extensions> Apps Script.
5. Click on line No: 8; change the “TO_ADDRESS” with the email address you want, and Save the “Script”.
6. Click on the Deploy > New Deployment.
7. Add any Description you want, change access to Anyone, and then Press “Deploy”.
8. If it asks you to authenticate, click Authorize Access.
9. Copy the Web App URL you created and add it to your static web page.
10. Download the HTML form sample data and navigate to the script editor.
11. Navigate to the script editor and paste the web app link you copied from google sheets in step 9 into the “Action Value”.
12. Copy the website URL and open the file in your web browser, fill out the subject line and email form and then click the submit button.
After that, check your email ID to see the success message!
Additionally, every etries or emails will be record if you or someone else send emails.
This step by step guide was based on the GitHub tutorial.
How to send email from HTML form without any backend
There are several websites and technologies available online that allow us to make useful HTML forms in a quick and easy way without writing a single line of backend code.
However, you can create a basic HTML form using the example below.
<form> <label for="email">Your Email</label> <input type="email" name="email" placeholder="Your email"> <br> <label for="name">Your name</label> <input type="text" name="name" placeholder="Your name"> <br> <button name="submit">Submit</button> </form>
Use the following web apps for making your form functional
Use the following setups
Go to the formcarry.com web page and sign up using your email address.
After that, Log in to your dashboard and you will see the code that you have to add to your HTML form.
Now, copy the “action” and “method” HTML file attributes.
<form action="https://formcarry.com/s/uztm8yEvX1" method="POST">
After that, Paste the form tag attributes to your HTML form as shown below.
<form action="https://formcarry.com/s/uztm8yEvX1" method="POST"> <label for="email">Your Email</label> <input type="email" name="email" placeholder="Your email"> <br> <label for="name">Your name</label> <input type="text" name="name" placeholder="Your name"> <br> <button name="submit">Submit</button> </form>
Now you have to refresh your web page and fill out the HTML form. Then hit/submit the form.
You will be redirected to the Thank You page.
Now, you can go to formcarry.com and navigate to the detail dashboard.
You will be able to see all the details you filled in the contact form.
So, if you have any questions you can ask me in the comment section.
Hope you found this tutorial on how to send emails from a static HTML page helpful.