mail

package module
v0.0.0-...-38d8c38 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2016 License: MIT Imports: 5 Imported by: 0

README

m-mail (Alpha version)

Introduction

m-mail is havily inspired from Gomail. I really tried to build over what the author of gomail did with little more structured codebase and some public function signatures.

m-mail can be used to send emails using an SMTP server or with API server (having support for some popular email vendors.)

This repository is tested with Go 1.6

Documentation

Overview

Package mail exposes functions to create Message object and send them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DialAndSend

func DialAndSend(dialer *sender.Dialer, messages ...*message.Message) error

DialAndSend opens a connection to the SMTP server, sends the given emails and closes the connection.

func NewMessage

func NewMessage(subject, body, emailType string, settings ...message.MessageSetting) *message.Message

NewMessage creates a Message object with optional MessageSetting.

func NewPlainDialer

func NewPlainDialer(host string, port int, username, password string) *sender.Dialer

NewPlainDialer returns a new SMTP Dialer. The given parameters are used to connect to the SMTP server.

func PlainAuth

func PlainAuth(username, password, host string) smtp.Auth

PlainAuth returns a plain smtp.auth object.

func SendMail

func SendMail(auth *smtp.Auth, to, from string, msg *message.Message, host string, port int) (string, error)

SendMail is a temporary function to send mail. To be scrapped.

Types

This section is empty.

Directories

Path Synopsis
Package common contains functions, structures, constants to be used across m-mail.
Package common contains functions, structures, constants to be used across m-mail.
Package message contains Message structure and implements every method on it.
Package message contains Message structure and implements every method on it.
Package sender handles authentication and interaction with server.
Package sender handles authentication and interaction with server.

Jump to

Keyboard shortcuts

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