mail

package
v0.0.0-...-c78d268 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2021 License: GPL-2.0 Imports: 11 Imported by: 0

Documentation

Overview

used to send mail

Index

Constants

View Source
const (
	ImapHost       = "imap.exmail.qq.com" // receive mail
	ImapPortSecure = 993                  //receive mail
	Smtphost       = "smtp.exmail.qq.com" // send mail
	Smtpport       = 25                   // send mail
	Identity       = "Oscar"
	User           = "shuailong@tenxcloud.com"
	Pass           = "xue1227xue"
)

Variables

This section is empty.

Functions

func SendMail

func SendMail(to []string, subject, body string) error

SendMail enables a user to send mail to any mails

Types

type Email

type Email struct {
	Date    time.Time `json:"date"`
	From    string    `json:"from"`
	To      string    `json:"to"`
	Subject string    `json:"subject"`
	Content string    `json:"content"`
}

Email is a complete mail

type MailClient

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

func (*MailClient) ListMailBox

func (mc *MailClient) ListMailBox() ([]imap.MailboxInfo, error)

func (*MailClient) ListMails

func (mc *MailClient) ListMails(mailbox string, n uint32) ([]Email, []error)

ListMails lists parsed mails and errors

func (*MailClient) ReceiveRaw

func (mc *MailClient) ReceiveRaw(mailbox string, n uint32) ([]imap.Message, error)

Jump to

Keyboard shortcuts

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