gosmtp

package module
v0.0.0-...-384233d Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2016 License: MIT Imports: 7 Imported by: 0

README

gosmtp

Usage:

sender := &EmailSender{ServerAddr:"192.168.254.2",ServerPort:25,SenderEmail:"sender@example.com"} sender.Init()

content:=<html> <body> This is a test mail. </body> </html>

sender.AddQueue(&Task{Subject:"This is a test mail",To:[]string{"recipient@example.com"},Content:[]byte(content)})

Documentation

Index

Constants

View Source
const QueueSize = 100

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailSender

type EmailSender struct {
	ServerAddr  string
	ServerPort  int
	SenderEmail string
	Username    string
	Password    string
	UseTLS      bool
	// contains filtered or unexported fields
}

func (*EmailSender) AddQueue

func (e *EmailSender) AddQueue(t *Task) (string, <-chan error)

func (*EmailSender) Init

func (e *EmailSender) Init() <-chan error

type Task

type Task struct {
	Subject string
	To      []string
	Content []byte
	Headers map[string]string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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