This is a simple email client application with a RESTful API backend written in Go. It supports multiple email providers, with current implementation focused on ProtonMail
!!This is a work in progress
The overall goal of this project is to make a feature rich and extensible email client backend that can be used to aggregate all email services in one frontend.
- RESTful API for email operations
- Support for multiple email providers through SMTP and IMAP protocols and specific Google, ProtonMail, and Microsoft Exchange implementations
- JWT-based authentication
- Email listing, viewing, and sending
- Go 1.16 or higher
- Clone the repository:
git clone https://github.com/gituser12981u2/mailclient.git
cd mailclient
- Install dependencies:
go mod tidy
- Create a
config.json
file in the project root with the following structure:
{
"server_address": ":8080",
"provider:" "proton",
"provider_config": {
"username": "your_protonmail_username",
"password": "your_protonmail_password"
},
"jwt_secret": "your_jwt_secret"
}
To start the server, run:
go run main.go
- GET
/api/v1/emails
: List emails - GET
/api/v1/emails/:id
: Get a specific email - POST
/api/v1/emails
: Send a new email
- main.go: Entry point of the application
internal/
: Contains the core application codeapi/
: API-related code including route setupconfig/
: Configuration loading and managementmodels/
: Data modelsproviders/
: Email provider implementationsservices/
: Business logic services
Contributions are welcome. Please feel free to sumbit a Pull Request.
This project is licensed under the MIT License.