email

package
v0.0.0-...-bd7d7c7 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

*

  • @Author: alienongwlx@gmail.com
  • @Description: send email by gomail
  • @Version: 1.0.0
  • @Date: 2020/4/15 19:50

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Email

type Email struct {
	To      []string
	Subject string
	Content string
}

* @description: Email Info Struct @attribute To: EMail Receiver @attribute Subject: Email Subject @attribute Content: Email Content

type MailService

type MailService struct {
	Host     string
	Port     int
	Account  string
	Password string
}

* @description: smtp servers @163 smtp.163.com:465 http://help.mail.163.com/faqDetail.do?code=d7a5dc8471cd0c0e8b4b8f4f8e49998b374173cfe9171305fa1ce630d7f67ac2cda80145a1742516 @126 smtp.126.com:465 http://help.mail.163.com/faqDetail.do?code=d7a5dc8471cd0c0e8b4b8f4f8e49998b374173cfe9171305fa1ce630d7f67ac2cda80145a1742516 @qq smtp.qq.com:465 https://service.mail.qq.com/cgi-bin/help?subtype=1&id=28&no=1001256 @sina smtp.sina.com:465 Password

* @description: MailService Struct @attribute Host: EMail Server @attribute Port: Port @attribute Account: Email Account @attribute Password: Email Password

func NewMailService

func NewMailService(host string, port int, account, password string) *MailService

* @description: NewMailService @param host: EMail Server @param port: Port @param account: EMail account @param password: EMail password @return: MailService

func (*MailService) SendMail

func (ms *MailService) SendMail(email *Email) error

* @description: SendMail @param email: Email Struct Info @return: error or nil

Jump to

Keyboard shortcuts

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