Documentation
¶
Overview ¶
Package graph is the Microsoft Graph sending backend (ADR 0037), for a mailbox whose SMTP AUTH is disabled.
Index ¶
Constants ¶
const SendURL = "https://graph.microsoft.com/v1.0/me/sendMail"
SendURL is Graph's sendMail.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
Sender submits through Graph's sendMail with the Token its credentials give. Graph files the sent copy itself (saveToSentItems).
func New ¶
func New(url string, creds backend.CredentialsFunc) *Sender
New is a Sender posting to url, normally SendURL.
func (*Sender) Send ¶
Send submits raw to rcpts: ErrUncertain once the whole request went out without an answer, backend.ErrAuthFailed for a refused token, a *backend.RejectedError (5xx) for a refused message. Graph takes recipients from the headers, so rcpts not in To or Cc are added as Bcc to the copy Graph gets (Exchange strips it); from is the mailbox's own.