graph

package
v1.34.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 15 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package graph is the Microsoft Graph sending backend (ADR 0037), for a mailbox whose SMTP AUTH is disabled.

Index

Constants

View Source
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) SavesSent

func (*Sender) SavesSent() bool

func (*Sender) Send

func (s *Sender) Send(ctx context.Context, _ string, rcpts []string, raw []byte) error

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.

Jump to

Keyboard shortcuts

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