https://github.com/ajaynegi45/formmaillygo
FormMaillyGo lets you send contact form messages from any website directly to your email — for free. It's fast, secure, and runs on AWS Lambda, so no monthly limits like other services. Just plug it in and get messages instantly.
https://github.com/ajaynegi45/formmaillygo
aws-lambda email-service form-submission free-contact-form golang serverless
Last synced: 11 months ago
JSON representation
FormMaillyGo lets you send contact form messages from any website directly to your email — for free. It's fast, secure, and runs on AWS Lambda, so no monthly limits like other services. Just plug it in and get messages instantly.
- Host: GitHub
- URL: https://github.com/ajaynegi45/formmaillygo
- Owner: ajaynegi45
- License: other
- Created: 2025-07-25T20:00:00.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-08-25T18:33:45.000Z (11 months ago)
- Last Synced: 2025-08-25T20:38:53.260Z (11 months ago)
- Topics: aws-lambda, email-service, form-submission, free-contact-form, golang, serverless
- Language: HTML
- Homepage: https://ajaynegi45.github.io/FormMaillyGo
- Size: 617 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
## FormMaillyGo – Free, Serverless Contact Form to Email Gateway
**FormMaillyGo** is a lightweight backend that turns any contact form submission into a **real email** — **fast, secure, and completely free (within generous [AWS Lambda limits](https://aws.amazon.com/lambda/pricing/) )**.
### 🧑💻 Whom is this for?
* Solo developers, indie hackers, or small startups
* Static websites (like those on Netlify, Vercel, GitHub Pages)
* Anyone tired of paid contact form services (like Formspree, Getform, etc.)
---
## 🚀 Why Use FormMaillyGo?
Most free contact form services only allow **50–100 submissions/month**. That’s *very* limited.
FormMaillyGo runs on **AWS Lambda (or any serverless platform)**, which has a **much higher free tier**. It’s ideal for scaling contact form handling **at zero or ultra-low cost**.
You only pay if your usage goes beyond free limits — and even then, it’s cheaper than paid form services.
The AWS Lambda free tier includes one million free requests per month and 400,000 GB-seconds of compute time per month
---
## 🛠️ How It Works
1. Your frontend sends a **JSON POST** request to `/api/contact`
2. FormMaillyGo:
* ✅ Validates input (like name, email, etc.)
* 📧 Formats a clean HTML email
* 📤 Sends the message via SMTP (Gmail, SES, Postmark, etc.)
3. You receive the message directly in your inbox.
---
## 🔐 Key Benefits
* **Zero dependency**: No external SDKs or vendor lock-in.
* **Military-grade validation**: Validates names, emails, message content.
* **Fully async-ready**: No delay to your main app.
* **Perfect for serverless**: Cold-start optimized.
---
## 🧪 API Endpoints
| Method | Endpoint | Description |
| ------ | -------------- | --------------------------- |
| GET | `/api/health` | Check if the server is live |
| POST | `/api/contact` | Send contact form data |
### Example Contact Form Payload:
```json
{
"name": "Alice",
"email": "alice@email.com",
"subject": "Product Feedback",
"message": "Loved your product!",
"product_name": "MySite",
"product_website": "https://mysite.com"
}
```
---
## 🧾 Setup
### 1. Set up your `.env` file:
```
SENDER_EMAIL=your@gmail.com
SENDER_EMAIL_PASSWORD=your-gmail-app-password
RECEIVER_EMAIL=you@example.com
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
```
### 2. Run the server:
```bash
go run main.go
```
Works out-of-the-box on port **8080**.
---
## 📁 File Structure (Simplified)
| File | Role |
| --------------------- | -------------------------------------- |
| `main.go` | Sets up server + routes |
| `handler.go` | Handles requests + JSON validation |
| `email.go` | Sends emails using SMTP |
| `contact.go` | Defines the contact form structure |
| `validator.go` | Validates inputs like email, URL, etc. |
| `config.go` | Loads SMTP config from `.env` |
| `template/contact.go` | Generates HTML email template |
---
## 🧘 Simplicity + Power
FormMaillyGo gives you **control without complexity**. You get:
* Unlimited usage (within AWS/GCP free tier)
* Full validation
* Fully customizable
* No monthly fees
## License & Attribution
This project is under MIT License
Read carefully [MIT License](https://github.com/ajaynegi45/FormMaillyGo/blob/main/LICENSE) [NOTICE](https://github.com/ajaynegi45/FormMaillyGo/blob/main/NOTICE)