Documentation ¶
Overview ¶
Package emailclient is a client for talking to emailservice.
Index ¶
Constants ¶
const DefaultEmailServiceURL = "http://emailservice:8000/send"
DefaultEmailServiceURL is the address of the service running in the default namespace.
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 NewAt ¶
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.