mail

package module
v0.0.0-...-09495c3 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2015 License: Apache-2.0 Imports: 0 Imported by: 0

README

mail

Email related module

How to use

get this library with go get

$ go get github.com/mokelab-go/mail

Create client object and call Send method

client := mailgun.New(apiKey, domain, from)
err := client.Send(to, subject, body)

example

package main

import (
	"fmt"
	"github.com/mokelab-go/mail/mailgun"
)

const (
	apiKey  = "<Input your API Key>"
	domain  = "<Input your domain in mailgun>"
	from    = "<Input from address>"
	to      = "<Input to address>"
	subject = "メールガンから送信"
	body    = "テストコードから本文"
)

func main() {
	client := mailgun.New(apiKey, domain, from)
	err := client.Send(to, subject, body)
	if err != nil {
		fmt.Printf("Unexepcted Error : %s", err)
	}
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MailClient

type MailClient interface {
	// Sends email
	Send(email, subject, body string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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