hectane

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2015 License: MIT Imports: 11 Imported by: 0

README

go-cannon

The goal of go-cannon is simple: to create an SMTP client that is extremely easy to configure and use. The application exposes a simple HTTP API that is used for sending emails.

Features

  • support for TLS encryption and HTTP basic auth
  • mail queue that efficiently delivers emails to hosts
  • MX records for the destination host are tried in order of priority

Parameters

go-cannon currently recognizes the following command-line parameters (all are optional):

  • -bind - address to bind to (in the format host:port - default is :8025)
  • -tls-cert - path to TLS certificate
  • -tls-key - path to TLS key
  • -username - username for HTTP basic auth
  • -password - password for HTTP basic auth

Usage

go-cannon exposes an HTTP API that can be used to deliver emails. The API expects and responds with JSON data. Currently, the API consists of the following methods:

GET /v1/version
Response
{
    "version": "x.y.z"
}
POST /v1/send
Parameters
  • from - sender email address
  • to - list of recipient email addresses
  • cc - list of carbon copy recipients
  • bcc - list of blind carbon copy recipients
  • subject - email subject
  • text - body of the email as plain text
  • html - body of the email as HTML
Response

The response is either an empty JSON object (indicating success) or a JSON object with an error key describing the problem.

Planned Features

The following features are planned for a future release:

  • file attachments
  • persisting mail queue to disk

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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