An Open-Source Gmail Alternative for the Future of Email
- What is Mail0.io?
- Why Mail0.io?
- Our Mission
- Documentation
- Roadmap π€οΈ
- Development Priorities
- Join the Movement π
- Tech Stack
- Getting Started
- Contribute
- Issues
- Pull Request
- License
Mail0.io is an open-source email solution that gives users the power to self-host their own email app while also integrating external services like Gmail and other email providers. Our goal is to put control, privacy, and customization back into the hands of usersβwhether they choose to host their email independently or manage multiple inboxes from a single, customizable platform.
Most email services today are either closed-source, data-hungry, or too complex to self-host. Mail0.io is different:
β Fully Open-Source β No hidden agendas, no walled gardens. 100% transparency. π Data Privacy First β Your emails, your data. No tracking, no selling, no middlemen. βοΈ Self-Hosting Freedom β Run your own email app with ease. π¬ Unified Inbox β Connect multiple email providers like Gmail, Outlook, and more. π¨ Customizable UI & Features β Tailor your email experience the way you want it. π Developer-Friendly β Built with extensibility and integrations in mind.
We believe email should be:
- Yours β You control where your data is stored.
- Flexible β Use it however you wantβself-hosted or connected to third-party providers.
- Open β Transparent development, open collaboration, and community-driven innovation.
- User-Friendly β No need for technical expertise to get started.
This document outlines the development roadmap for Mail0.io. Our vision is to create a powerful, user-friendly, and privacy-focused email experience.
- Connect main email providers
- Support for multiple email accounts
- Unified inbox experience
- AI-powered email assistance
- Advanced drag-and-drop tools
- Customizable keyboard shortcuts
- Performance optimization
- Enhanced search capabilities
- Deep customization options
- Domain management
- Optimized email client
- Self-hosting capabilities
- Building a robust foundation for email management
- Implementing user-requested features
- Ensuring seamless integration with existing email providers
- Maintaining high performance and reliability
We welcome community input and contributions to help shape these features and priorities. If you have suggestions or would like to contribute, please:
- Open an issue to discuss new feature ideas
- Submit pull requests for improvements
- Join discussions in existing issues
This roadmap is a living document and will be updated as development progresses and priorities evolve based on community feedback and technological advances.
Mail0.io is not just another email appβit's a vision for a better, more open, and user-controlled email ecosystem. If you believe in privacy, open-source software, and giving users control, we'd love for you to join us!
π’ Follow our progress β Stay updated on GitHub as we build Mail0.io. π‘ Contribute β Share your ideas, suggest features, and help shape the project. π€ Community-driven β Our goal is to create an email solution for the people, by the people.
We're just getting started. If you're excited about a future where email belongs to users, not corporations, let's make it happen together.
π€ Mail0.io β Email, Reimagined.
Mail0.io is built with modern and reliable technologies:
- Frontend: Next.js, React, TypeScript, TailwindCSS, Shadcn UI
- Backend: Node.js, Drizzle ORM
- Database: PostgreSQL
- Authentication: Better Auth, Google OAuth
Required Versions:
- Node.js >= 18.0.0
- pnpm >= 8.0.0
- Docker >= 20.10.0
Before running the application, you'll need to set up several services and environment variables:
-
Setup Local Services with Dev Container and Docker
-
Open codebase as a container in VSCode or your favorite VSCode fork.
-
Run the following commands in order to populate your dependencies and setup docker
pnpm install pnpm docker:up
-
Run the following commands to clean up after yourself
pnpm docker:down rm -rf node_modules rm pnpm-lock.yaml
-
Run the following commands if you are unable to start any of the services
rm -rf node_modules rm pnpm-lock.yaml
-
Better Auth Setup
-
Open
.env
and change the BETTER_AUTH_SECRET to a random string. (Useopenssl rand -hex 32
to generate a 32 character string)BETTER_AUTH_SECRET=your_secret_key
-
-
Google OAuth Setup
-
Go to Google Cloud Console
-
Create a new project
-
Add the following APIs to your Google Cloud Project: People API, Gmail API
- Use links above and click 'Enable' or
- Go to 'APIs and Services' > 'Enable APIs and Services' > Search for 'Google People API' and click 'Enable'
- Go to 'APIs and Services' > 'Enable APIs and Services' > Search for 'Gmail API' and click 'Enable'
-
Enable the Google OAuth2 API
-
Create OAuth 2.0 credentials (Web application type)
-
Add authorized redirect URIs:
- Development:
http://localhost:3000/api/auth/callback/google
http://localhost:3000/api/v1/mail/auth/google/callback
- Production:
https://your-production-url/api/auth/callback/google
https://your-production-url/api/v1/mail/auth/google/callback
- Development:
-
Add to
.env
:GOOGLE_CLIENT_ID=your_client_id GOOGLE_CLIENT_SECRET=your_client_secret GOOGLE_REDIRECT_URI=http://localhost:3000/api/v1/mail/auth/google/callback
-
Add yourself as a test user:
- Goto
Audience
- Under 'Test users' click 'Add Users'
- Add your email and click 'Save'
- Goto
-
Warning
The GOOGLE_REDIRECT_URI
must match exactly what you configure in the Google Cloud Console, including the protocol (http/https), domain, and path - these are provided above.
-
Github OAuth Setup
-
Go to Github Developer Setting
-
Create a new OAuth Apps
-
Add authorized redirect URIs:
- Development:
http://localhost:3000/api/auth/callback/github
- Production:
https://your-production-url/api/auth/callback/github
- Development:
-
Add to
.env
:GITHUB_CLIENT_ID=your_client_id GITHUB_CLIENT_SECRET=your_client_secret
-
Copy .env.example
to .env
and configure the following variables:
# Auth
BETTER_AUTH_SECRET= # Required: Secret key for authentication
# Google OAuth (Optional)
GOOGLE_CLIENT_ID= # Required for Gmail integration
GOOGLE_CLIENT_SECRET= # Required for Gmail integration
GOOGLE_REDIRECT_URI= # Required for Gmail integration
# Database
DATABASE_URL= # Required: PostgreSQL connection string
Drizzle will apply the schema migrations set in .env
pnpm db:push
- Use
pnpm db:studio
to view and manage your data
Run the development server:
pnpm dev
Open http://localhost:3000 with your browser to see the result.
- You can fork the repository and make your changes on your forked repository. Once you have made your changes, you can create a pull request to the main branch.
- To add code to the main branch, make a pull request. Your code should always be reviewed by a partner, not yourself!
If you spot a problem with the docs, search if an issue already exists. If a related issue doesn't exist, you can open a new issue using a relevant issue form.
Scan through our existing issues to find one that interests you. You can narrow down the search using labels
as filters. See "Label reference" for more information. As a general rule, we don't assign issues to anyone. If you find an issue to work on, you are welcome to open a PR with a fix.
When you're finished with the changes, create a pull request, also known as a PR.
- Fill the "Ready for review" template so that we can review your PR. This template helps reviewers understand your changes as well as the purpose of your pull request.
- Don't forget to link PR to issue if you are solving one.
- Enable the checkbox to allow maintainer edits so the branch can be updated for a merge. Once you submit your PR, a reviewer will review your proposal. We may ask questions or request additional information.
- We may ask for changes to be made before a PR can be merged, either using suggested changes or pull request comments. You can apply suggested changes directly through the UI. You can make any other changes in your fork, then commit them to your branch.
- As you update your PR and apply changes, mark each conversation as resolved.
- If you run into any merge issues, checkout this git tutorial to help you resolve merge conflicts and other issues.
Mail0.io is licensed under the MIT License. This means you can:
β Use the software commercially β Modify the source code β Distribute your modifications β Use and modify the software privately
The only requirement is that you include the original copyright and license notice in any copy of the software/source.
See the LICENSE file for the full license text.