Skip to content

mccormickt/freemaild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

freemaild

SMTP relay for sending emails via Gmail's API.

Usage

  1. Create a new project on Google Cloud Platform (optional) and activate the Gmail API, using the account you wish Freemaild to send emails from.
  2. Create an OAuth 2.0 Client ID for Freemaild to use, save the credential file as freemaild.json.
  3. Grab an OAuth token for your gmail account. It will be saved to /etc/freemaild/token.json by default.
$ ./freemaild init

A link will be displayed on the console. Navigate to it in a browser, log into your desired Google account, and accept the dialogue after allowing your Freemaild instance to send emails on your behalf. Enter the token given from Google back into the console, creating your token.

  1. Run the server, specifying server address, listen port, and app credential file (from step 2) path via environment variables.
$ FREEMAILD_ADDRESS=127.0.0.1 FREEMAILD_PORT=2025 ./freemaild
  1. Send an email via SMTP to the server, it should forward it out to the recipient via your Gmail account!

Docker

A docker image is available and can be used as such:

$ docker run -it -v /etc/freemaild:/etc/freemaild ghcr.io/jan0ski/freemaild:latest [init]

About

SMTP relay for sending emails via Gmail API

Resources

License

Stars

Watchers

Forks

Packages

No packages published