emailHandler

package
v1.21.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

README

emailHandler

emailHandler provides email composition and sending via SMTP using gomail.

Variables

Variable Description
EMAIL_From Default sender address
EMAIL_Footer Default email footer text
Emailer *gomail.Dialer instance for sending

Constants

Constant Description
DATEMSG Date format string for email timestamps
ES_FROM, ES_TO, ES_CC, ES_SUBJECT, ES_TYPE Email field identifiers

Functions

Function Description
Email_init() *gomail.Dialer Initializes the email dialer from commonConfig settings
SendEmail(to, name, subject, body string) Sends an HTML email to the given recipient

Example

import "github.com/mt1976/frantic-core/emailHandler"

func main() {
    emailHandler.Email_init()
    emailHandler.SendEmail("user@example.com", "User", "Subject", "<p>Hello!</p>")
}

Documentation

Overview

Package emailHandler manages email composition and sending utilities.

Index

Constants

View Source
const (
	DATEMSG    = "2006-01-02 at 15:04:05"
	ES_FROM    = "From"
	ES_TO      = "To"
	ES_CC      = "Cc"
	ES_SUBJECT = "Subject"
	ES_TYPE    = "text/html"
)

The `const` block defines a set of constants used in the email package.

Variables

View Source
var EMAIL_Footer string
View Source
var EMAIL_From string
View Source
var Emailer *gomail.Dialer

Functions

func Email_init

func Email_init() *gomail.Dialer

The function initializes and returns a gomail.Dialer object for sending emails.

func SendEmail

func SendEmail(to string, name string, subject string, body string)

The function `SendEmail` sends an email with the specified recipient, subject, and body, using the `gomail` package in Go.

Types

This section is empty.

Jump to

Keyboard shortcuts

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