emailclient

package
v0.0.0-...-0ec319e Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package emailclient is a client for talking to emailservice.

Index

Constants

View Source
const DefaultEmailServiceURL = "http://emailservice:8000/send"

DefaultEmailServiceURL is the address of the service running in the default namespace.

View Source
const NamespacedEmailServiceURL = "http://emailservice.emailservice.svc.cluster.local:8000/send"

NamespacedEmailServiceURL is the address of the service running in its own namespace.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client for sending emails to the emailservice.

func New

func New() Client

New returns a new Client.

func NewAt

func NewAt(url string) Client

NewAt returns a new Client that points at a specific service URL. Used in cases where the default URL won't work, for example

func (Client) SendWithMarkup

func (c Client) SendWithMarkup(fromDisplayName string, from string, to []string, subject, body, markup, threadingReference string) (string, error)

SendWithMarkup sends an email with gmail markup. Returns the messageId of the sent email. Documentation about markups supported in gmail are here: https://developers.google.com/gmail/markup/ A go-to action example is here: https://developers.google.com/gmail/markup/reference/go-to-action

It is almost a drop-in replacement for email.Gmail.SendWithMarkup with the following changes:

- The 'from' email address must be supplied.

func (Client) Valid

func (c Client) Valid() bool

Valid returns true if this is a valid client.

Jump to

Keyboard shortcuts

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