email

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2024 License: MIT Imports: 5 Imported by: 0

README

email Package

The email package supports ITRS Geneos specific EMail parameters as documented in the official libemail🔗 but with additional support for TLS and Basic Authentication.

This package duplicates the original functionality in the cordial libemail library but for more general use.

The Dial method accepts a config object and returns a mail.Dialer or an error.

The new parameters, which are case-insensitive, are:

  • _smtp_username - no default

    If set then authentication is attempted. The authentication methods supported are those supported by the Go net/smtp package.

  • _smtp_password - no default

    The password is only used if _smtp_username is defined. It should be stored encrypted using the "expandable" format created using geneos aes password program

  • _smtp_tls - default default

    Can be one of default, force or none (case insensitive). default is to try TLS but fall back to plain text depending on the SMTP server. force require TLS or will fail while none does not try to establish a secure session and may be rejected by modern mail servers.

Documentation

Overview

The email package provides Geneos specific email processing to support libemail and other email senders using Geneos formatted parameters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(conf *config.Config) (d *mail.Dialer, err error)

Dial sets up a Dialer using the Geneos _SMTP_* parameters

All the parameters in the official docs are supported and have the same defaults

Additional parameters are * _SMTP_TLS - default / force / none (case insensitive) * _SMTP_USERNAME - if defined authentication attempted * _SMTP_PASSWORD - password in [ExpandString] format

func Envelope

func Envelope(conf *config.Config) (m *mail.Message, err error)

Envelope processes the Geneos libemail parameters for _FROM, _TO, _CC and _BCC and their related parameters stored in conf and returns a populated mail.Message structure or an error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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