email

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendComplexMessage

func SendComplexMessage(domain, apiKey string) (string, error)

func SendScheduledMessage

func SendScheduledMessage(domain, apiKey string) (string, error)

Types

type Mailgun

type Mailgun struct {
	Domain string // ie: mail.xxx.com
	APIKey string
}

func (*Mailgun) SendBatchEmail

func (mgObj *Mailgun) SendBatchEmail(from, subject, text, template string, to map[string]interface{})

当大于1000条的时候,自动分成若干个1000条的发出去。

func (*Mailgun) SendBatchMessageLessThan1k

func (mgObj *Mailgun) SendBatchMessageLessThan1k(from, subject, text, template string, to map[string]interface{})

https://documentation.mailgun.com/en/latest/user_manual.html#batch-sending The maximum number of recipients allowed for Batch Sending is 1,000.

to的形式:{
  "user1@example.com" : {"var1": "ABC123456789", "var2": "adfsa"},
  "user2@example.com" : {"var1": "ZXY987654321", "var2": "34123"}
}

func (*Mailgun) SendSimpleMessage

func (mgObj *Mailgun) SendSimpleMessage(from, subject, text, template, to string)

Jump to

Keyboard shortcuts

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