smtpclient

package
v2.26.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SMTPCredentials

type SMTPCredentials struct {
	SenderLogin    string `mapstructure:"sender_login" docs:";The login to be used by sender."`
	SenderMail     string `mapstructure:"sender_mail" docs:";The email to be used to send mails."`
	SenderPassword string `mapstructure:"sender_password" docs:";The sender's password."`
	SMTPServer     string `mapstructure:"smtp_server" docs:";The hostname of the SMTP server."`
	SMTPPort       int    `mapstructure:"smtp_port" docs:"587;The port on which the SMTP daemon is running."`
	DisableAuth    bool   `mapstructure:"disable_auth" docs:"false;Whether to disable SMTP auth."`
	LocalName      string `mapstructure:"local_name" docs:";The host name to be used for unauthenticated SMTP."`
}

SMTPCredentials stores the credentials required to connect to an SMTP server.

func NewSMTPCredentials

func NewSMTPCredentials(c *SMTPCredentials) *SMTPCredentials

NewSMTPCredentials creates a new SMTPCredentials object with the details of the passed object with sane defaults.

func (*SMTPCredentials) SendMail

func (creds *SMTPCredentials) SendMail(recipient, subject, body string) error

SendMail allows sending mails using a set of client credentials.

Jump to

Keyboard shortcuts

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