smtp

package
v0.0.0-...-7becda7 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

README

#smtp

demo

package main

import (
	"log"

	"github.com/XieXianbin/sms-provider/smtp"
)

func main() {
	s := smtp.New("smtp.exmail.qq.com:25", "notify@a.com", "password")
	log.Println(s.SendMail("notify@a.com", "ulric@b.com;rain@c.com", "这是subject", "这是body,<font color=red>red</font>"))
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Smtp

type Smtp struct {
	Address  string
	Username string
	Password string
}

func New

func New(address, username, password string) *Smtp

func (*Smtp) SendMail

func (this *Smtp) SendMail(from, tos, subject, body string, contentType ...string) error

Jump to

Keyboard shortcuts

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