email

package
v0.0.0-...-3d0adf2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

====================================================

# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : config.go # Created : 2019/1/7 14:56 # Last Modified : 2019/1/7 14:56 # Describe : # # ====================================================

====================================================

# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : request.go # Created : 2019/1/8 12:03 # Last Modified : 2019/1/8 12:03 # Describe : # # ====================================================

====================================================

# Copyright (C)2019 All rights reserved. # # Author : domchan # Email : 814172254@qq.com # File Name : send.go # Created : 2019-01-07 14:20:59 # Last Modified : 2019-01-07 14:20:59 # Describe : # # ====================================================

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(cfg Config) *Client

func (*Client) Send

func (c *Client) Send(msg send.Message, do send.DoRes) error

Send 发送邮件,msg用mail.NewRequest(...)生成 do参数不做处理

type Config

type Config struct {
	// 邮件服务的地址,host:port
	ServerAddr string
	// 登陆邮件服务的用户名
	Username string
	// 登陆密码
	Password string
	// 邮件服务的域名
	Host string
	// 是否是tls服务
	TLS bool
}

Config 用于连接邮件服务器的配置

type Request

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

Message implements send.Message

func NewMessage

func NewMessage(to, subject, data string) *Request

func (*Request) Content

func (m *Request) Content() []byte

func (*Request) To

func (m *Request) To() string

Jump to

Keyboard shortcuts

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