This project allows you to send an email to any recipient just by entering their email and your message. It uses a simple HTML/CSS form and Google Apps Script to send emails — no backend server required!
- Clean and responsive email form UI
- Sends real emails to any address
- No backend or server setup needed
- 100% free using Google Apps Script
- No CORS or JavaScript fetch issues (uses iframe submission)
You can try the working version of this email sender here:
📩 Enter your own email address and write any short message.
Then click Send — you’ll instantly receive the message in your inbox!
This is a great way to see the system working in real-time.
- Go to https://script.google.com
- Click on
+ New Project - Replace the default code with this:
function doPost(e) {
var email = e.parameter.email;
var message = e.parameter.message;
MailApp.sendEmail(email, "Message from Contact Form", message);
return HtmlService.createHtmlOutput("Success");
}-
Save the project (e.g., SendEmailService)
-
Click Deploy > Manage Deployments > New Deployment
-
For type, select Web App
-
Set:
Execute as: Me (your account)
Who has access: Anyone
- Click Deploy and copy the Web App URL (e.g., https://script.google.com/macros/s/AKfycb.../exec)
Replace the form's action with your copied Web App URL:
<form action="YOUR_SCRIPT_URL" method="POST" target="hidden_iframe" onsubmit="document.getElementById('status').innerText = 'Sending...';">
Then open the HTML file in your browser and test it!
- Step - Description
- Create Apps Script project
- Add doPost function
- Deploy as Web App (access: Anyone)
- Link your Web App URL in HTML form
- Done! Test and use it anytime
- You must be signed in to a Google account with Gmail access.
- Google might ask for permissions the first time.
- Avoid spamming emails; this is not for marketing blasts.
- Free Gmail accounts have daily limits (around 100 emails/day).
- For better UI or custom subject lines, enhance the HTML or script accordingly.
├── email-sender-app.html # Email form frontend
└── README.md # This documentation file
-
Add a subject field
-
Use HTML email body
-
Store sent messages in Google Sheets
-
Add validation and error handling
- Built using:
-
Google Apps Script (MailApp)
-
HTML + CSS only