mailer

command module
v0.0.0-...-74a8149 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2015 License: MIT Imports: 6 Imported by: 0

README

Mailer

Mass Newsletter Mailing with Go

Introduction

This application seeks to make sending emails in bulk easier.

It is particularly suited to sending a single email e.g. a newsletter to many users asynchronously, something Go is extremely good at.

Requirements

This package only requires that you have Go installed and you have configured your $GOPATH

Installation

Assuming that your $GOPATH is already set, install the application by running:

$ go install https://github.com/kevgathuku/mailer

You should now be able to launch the app by running:

$ mailer

Usage

The application by default runs as a web application on port 3102. You can also specify the port by setting the PORT environment variable.

The application accepts input through a JSON POST request in the following format:

{
	"title": "Title of the newsletter",
	"content": "HTML content of the newsletter",
	"subscribers": ["subscriber1@example.com", "subscriber1@example.com", "subscriber..n@example.com"]
}

Once the POST request is received, the email is sent to the subscribers specified asynchronously.

The sending progress is displayed on the command line

Configuration

The application expects the follwing environment variables to be set:

SENDER_ADDRESS  # The Email to use as the FROM address
SMTP_HOST		# The SMTP host to use
SMTP_PORT		# SMTP Port to use
SMTP_USERNAME  	# SMTP username, if any
SMTP_PASSWORD  	# SMTP port, if any

Contributing

I am a noob at GO and I welcome any contributions that would help make this application better.

Any help would be greatly appreciated


Made with ♥ by Kevin Ndung'u

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/fatih/color
Package color is an ANSI color package to output colorized or SGR defined output to the standard output.
Package color is an ANSI color package to output colorized or SGR defined output to the standard output.
_workspace/src/github.com/joho/godotenv
Package godotenv is a go port of the ruby dotenv library (https://github.com/bkeepers/dotenv) Examples/readme can be found on the github page at https://github.com/joho/godotenv The TL;DR is that you make a .env file that looks something like SOME_ENV_VAR=somevalue and then in your go code you can call godotenv.Load() and all the env vars declared in .env will be avaiable through os.Getenv("SOME_ENV_VAR")
Package godotenv is a go port of the ruby dotenv library (https://github.com/bkeepers/dotenv) Examples/readme can be found on the github page at https://github.com/joho/godotenv The TL;DR is that you make a .env file that looks something like SOME_ENV_VAR=somevalue and then in your go code you can call godotenv.Load() and all the env vars declared in .env will be avaiable through os.Getenv("SOME_ENV_VAR")
_workspace/src/github.com/kevgathuku/postman/mail
Adapted from the Google App Engine github.com/scorredoira/email packages.
Adapted from the Google App Engine github.com/scorredoira/email packages.
_workspace/src/github.com/mattn/go-isatty
Package isatty implements interface to isatty
Package isatty implements interface to isatty
_workspace/src/github.com/shiena/ansicolor
Package ansicolor provides color console in Windows as ANSICON.
Package ansicolor provides color console in Windows as ANSICON.
_workspace/src/github.com/shiena/ansicolor/ansicolor
The ansicolor command colors a console text by ANSI escape sequence like wac.
The ansicolor command colors a console text by ANSI escape sequence like wac.
_workspace/src/gopkg.in/jordan-wright/email.v1
Package email is designed to provide an "email interface for humans." Designed to be robust and flexible, the email package aims to make sending email easy without getting in the way.
Package email is designed to provide an "email interface for humans." Designed to be robust and flexible, the email package aims to make sending email easy without getting in the way.

Jump to

Keyboard shortcuts

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