Bulk Email Sender is a small utility program that allows you to send bulk emails (duh!) using SMTP authentication.
Build the binary using Go's compiler
env GOOS=windows GOARCH=386 go build .
env GOOS=windows GOARCH=amd64 go build .
env GOOS=linux GOARCH=386 go build .
env GOOS=linux GOARCH=amd64 go build .
env GOOS=darwin GOARCH=386 go build .
env GOOS=darwin GOARCH=amd64 go build .
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.
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
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.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Made with ❤️ in Portugal
Software livre c*ralho! ✌️