Skip to content

nixmaldonado/BlazeMailer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blaze Mailer

Blaze Mailer is simple implementation of SMTP Go package.

It provides an HTTP endpoint to send emails.

Plus boilerplate code to handle your credentials with env vars.

Mac Installation

  • Clone repo

    git clone [email protected]:nixmaldonado/blazeMailer.git   
    
  • Configure 3 env vars

    export SMTP_PASSWORD="YOUR_PASSWORD"
    export SMPT_HOST="SMPT_HOST" //eg: "smtp.gmail.com"
    export SMTP_PORT="SMTP_PORT" //eg: "587" 
    
  • Run program from root folder

    go run cmd/main.go
    
  • Perform HTTP request to send mail:

    curl --request POST 'http://localhost:3000/email/send' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "from": "[email protected]",
        "to": "[email protected]",
        "subject":"This is Blaze Mailer",
        "body": "Hello World!"
    }'
    

About

Implementation of Go SMTP package.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages