bulk-email-sender

command module
v0.0.0-...-bef3e15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 7 Imported by: 0

README

Go Report Card Go

Bulk Email Sender

Bulk Email Sender is a small utility program that allows you to send bulk emails (duh!) using SMTP authentication.

Installation

Build the binary using Go's compiler

Windows

32 bits
env GOOS=windows GOARCH=386 go build .
64 bits
env GOOS=windows GOARCH=amd64 go build .

Linux

32 bits
env GOOS=linux GOARCH=386 go build .
64 bits
env GOOS=linux GOARCH=amd64 go build .

macOS

32 bits
env GOOS=darwin GOARCH=386 go build .
64 bits
env GOOS=darwin GOARCH=amd64 go build .

Usage

Please keep in mind that the following file structure is required:

├── bulk-email-sender
├── email-config.json
├── email-data.json
└── email.tmpl

The program will panic if it fails to load any of the files above.

Configuration instructions

Given the file structure above, the file:

  • email-config.json is where you should configure your SMTP authentication details
  • email-data.json is where you should define your variables and their respective values
  • email.tmpl is where you should define your email text and reference the variables you wish to replace. Keep in mind that you can ONLY change from subject onwards
Example

Given the following files: email-data.json

{
    "user": "someone@gmail.com",
    "password": "mySuperP@ssword",
    "host": "smtp.gmail.com",
    "port": "587",
    "sender-name": "John Appleseed",
    "sender-email": "someone@gmail.com"
}

email-data.json

{
    "variables": [
        {
            "RecipientName": "Rafael Almeida",
            "RecipientEmail": "rafael@gmail.com",
            "Variable1": "Value1",
            "Variable2": "Value2"
        }
    ]
}

email-data.json

To: "{{.RecipientName}}" {{emailAddressStructure .RecipientEmail}}
From: "{{.SenderName}}" {{emailAddressStructure .SenderEmail}}
Subject: Testing Bulk Email Sender
Hey,

Please note that:

- Variable 1 is {{.Variable1}}.
- Variable 2 is {{.Variable2}}.

Will render the following email:

Hey,

Please note that:

- Variable 1 is Value1.
- Variable 2 is Value2.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Made with ❤ in Portugal

Software livre c*ralho! ✌

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL