An open API service indexing awesome lists of open source software.

https://github.com/shravzzv/mailo

Mailo is an AI-powered email assistant that lets you ask questions and get intelligent replies β€” all through email. No app, no login, just email magic.
https://github.com/shravzzv/mailo

email mail nextjs postmark tailwind webhook

Last synced: 3 months ago
JSON representation

Mailo is an AI-powered email assistant that lets you ask questions and get intelligent replies β€” all through email. No app, no login, just email magic.

Awesome Lists containing this project

README

          

# πŸ“¬ Mailo

[**Mailo**](https://mailo-nine.vercel.app/) is a lightweight AI-powered email assistant that works entirely over email. No apps. No logins. Just send an email and get smart, context-aware replies delivered straight to your inbox β€” powered by GPT.

> Built for the [dev.to Postmark Challenge: Inbox Innovators](https://dev.to/challenges/postmark).

## ✨ Features

- πŸ“© **Email-first Interface** β€” Just send an email to interact, no account needed.
- 🧠 **GPT-Powered Intelligence** β€” Smart, human-like responses tailored to your message.
- ⚑ **Fast & Lightweight** β€” No bloated UI, just good old email.
- πŸ›‘οΈ **Privacy-first** β€” Only the message content is used to generate replies.

---

## πŸ› οΈ Tech Stack

| Tech | Role |
| ------------------------------ | ------------------------- |
| **Next.js 15** | API routes + landing page |
| **Postmark** | Inbound email parsing |
| **Nodemailer** | Sending reply emails |
| **OpenAI (via GitHub Models)** | LLM backend |
| **TypeScript** | Type safety |

## πŸ“¦ Architecture

User β†’ (sends email) to Postmark β†’ Next.js Webhook β†’ GPT-4.1 (GitHub) β†’ Mailo Nodemailer β†’ replies

## πŸ§ͺ Testing the App

1. Click the **Try it out** button on the landing page. πŸ“§
2. Send an email to the pre-configured address with a clear subject (your question) and detailed body (extra info). πŸ“
3. Wait a few seconds. ⏳
4. Check your inboxβ€”you’ll receive a helpful, AI-generated reply to your query! πŸ“¬
5. You can **reply directly** to the AI’s response email to continue the conversation. πŸ“£

> πŸ’‘ Feel free to keep the conversation goingβ€”just hit "Reply" on any AI-generated response.

## πŸš€ Getting Started

### 1. Clone the Repo

```bash
git clone https://github.com/shravzzv/mailo.git
cd mailo
npm install
```

### 2. Setup Environment Variables

Create a `.env` file and add:

```env
GITHUB_TOKEN=your_github_models_token
MAIL_USER=your_email@mail.com
MAIL_PASSWORD=your_email_password
```

### 3. Run Locally

```bash
npm run dev
```

## πŸ“¬ How It Works

1. A user sends an email to a Mailo-linked address.
2. Postmark parses it and hits a webhook hosted in your Next.js app.
3. The webhook extracts the subject + body, and sends it to GPT.
4. GPT generates a concise, email-style reply.
5. Nodemailer sends this reply back to the user.

## πŸ’‘ Rate Limit Handling

Mailo uses GitHub-hosted OpenAI models, which have a **15 requests/minute** and **150 requests/day** limit.

If the limit is hit:

- Users receive a graceful fallback response via email.
- Error is logged to the console, but doesn't crash the server.

## ✍️ Writing Style for GPT

The assistant is instructed to:

- Respond like a helpful human email assistant.
- Avoid greetings/sign-offs unless explicitly prompted.
- Be polite, concise, and helpful.
- Skip subject line formatting β€” that’s handled in code.

## πŸ›‘οΈ Deployment & Hosting

- Deploy your app on **Vercel**
- Use **Postmark** for production-grade email parsing

## 🀝 Contributing

Pull requests are welcome! For major changes, please open an issue first.

1. Fork the repo
2. Create a feature branch
3. Make changes
4. Submit a PR

## πŸ“„ License

MIT License. Feel free to fork and modify Mailo for your own AI tools.