api

command
v0.0.0-...-08917dc Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

README

SMTP API GoDoc

This is the SMTP API with fqdn go.micro.api.smtp for email delivery.

Getting Started

Prerequisites

Install Consul https://www.consul.io/intro/getting-started/install.html

Run Consul

$ consul agent -dev -advertise=127.0.0.1
Run Service
$ go run main.go
Usage
Send
[POST] http[domain:micro API port]/smtp/send
{
    "recipient":[
        "user@domain.com", 
        "user2@domain.com"
    ], 
    "subject": "Mail subject", 
    "body": "<table style=\"width:100%;\"><tr><td>lets</td><td>see</td></tr><tr><td>the</td><td>markup</td></tr></table>"
}

{}
Settings

Get resource /smtp/settings definition

[OPTIONS] http[domain:micro API port]/smtp/settings
{}

{
  "email_host": "required",
  "email_host_port": "required",
  "email_host_user": "required",
  "email_host_password": "required",
  "default_from_email": "required"
}

Create or update SMTP server configuration

[PUT] http[domain:micro API port]/smtp/settings
{
    "email_host": "EmailHost",
    "email_host_user": "EmailHostUser",
    "email_host_password": "EmailHostPassword",
    "email_host_port": "EmailHostPort",
    "default_from_email": "DefaultFromEmail"
}

{}

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