mail

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHeaders added in v0.5.0

func AddHeaders(content string, headers map[string]string) string

AddHeaders adds headers to a message.

func ExtractReceiverInternalName

func ExtractReceiverInternalName(content string) (receiver string, err error)

func ExtractReceiverInternalNames added in v0.5.0

func ExtractReceiverInternalNames(content string) (receiver []string, err error)

func ExtractSenderAddress

func ExtractSenderAddress(content string) (address string, err error)

ExtractSenderAddress returns full sender's address extracted from the content.

func InternalToExternalAddress

func InternalToExternalAddress(address string) (shortAddr, fullAddr string, err error)

InternalToExternalAddress parses the address and returns the short and full address suitable for sending messages to the external destinations.

func IsInternal added in v0.5.0

func IsInternal(name string) bool

IsInternal returns true if the name refers to an internal recipient.

func RewriteFromHeader

func RewriteFromHeader(message string) (rewrittenMessage string, fromAddr string, toAddr []string, err error)

RewriteFromHeader rewrites the message to change sender from internal to external format.

func StripDomain added in v0.5.0

func StripDomain(name string) string

StripDomain removes the domain name from name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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