mail-srv

command module
v0.0.0-...-37bf6de Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2016 License: MIT Imports: 8 Imported by: 0

README

Go Report Card Build Status

Mail-srv

Mail-srv is a microservice used to send & track emails using Postmark API. Built for Golang micro.mu

Getting started

  1. Install Consul

    Consul is the default registry/discovery for go-micro apps. It's however pluggable. https://www.consul.io/intro/getting-started/install.html

  2. Run Consul

    $ consul agent -server -bootstrap-expect 1 -data-dir /tmp/consul
    
  3. Setup config values in Consul KV

    mail/server-token Your postmark server token.

    mail/templates/{template-alias} Template aliases "KV" folder

  4. Download and start the service

    go get github.com/suicidegang/mail-srv
    mail-srv
    

The API

Mailing server implements the following RPC Methods

Mailing

  • SendTemplate
Mailing.SendTemplate
$ micro query sg.micro.srv.mail Mailing.SendTemplate '{
	"template": "user.signup",
	"variables": {"base_url": "https://spartangeek.com"},
	"message": {
		"from": "pedidos@spartangeek.com", 
		"fromName": "Lic. Alberto", 
		"to": "fernandez14@outlook.com", 
		"toName": "Nobody"
	}
}'
{
	"messageID": "bdff86f7-75d4-46b7-88f3-93b53a5b8448"
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
proto
mail
Package mail is a generated protocol buffer package.
Package mail is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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