gosendmail

package module
v0.0.0-...-ebafab7 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2015 License: Apache-2.0 Imports: 5 Imported by: 0

README

GoSendMail

GoSendMail is simple smtp sender. encoding utf8 only.

use sample:

// smtpServer info : IP Address, port, userName, Password
smtpServer := gosendmail.NewSmtpSever("xxx.xxx.xxx.xxx", 25, "yyy", "zzz")

// sendmail info : from address, to address, cc address, subject, body
sendMail := gosendmail.NewSendMail("abc@xxx.xxx", []string{"abc@xxx.xxx"},
  []string{"xyz@gxxx.xxx"}, "UTF8のSubject", "UTF8の本文")

// send smtp mail
err := gosendmail.SendSmtp(smtpServer, sendMail)
if err != nil {
    log.Fatal(err)
     os.Exit(1)
}

install:

% go get github.com/bose999/gosendmail

Documentation

Overview

Package gosendmail can send utf8 mail.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendSmtp

func SendSmtp(smtpServer SmtpServer, sendmail SendMail) error

send utf8 smtp mail

Types

type SendMail

type SendMail struct {
	// contains filtered or unexported fields
}

mail value and build method

func NewSendMail

func NewSendMail(from string, to []string, cc []string, subject string, body string) SendMail

create new SendMail Instance

type SmtpServer

type SmtpServer struct {
	// contains filtered or unexported fields
}

func NewSmtpSever

func NewSmtpSever(serverName string, port int, userName string, password string) SmtpServer

creat new SmtpServer Instance

Jump to

Keyboard shortcuts

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