tasks

package
v1.35.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Send = delay.Func("email-send", func(c context.Context, in integration.Integration, message *email.Message) error {
	log.Debug("Sending email to %s, %v", message.To[0], message, c)

	provider, err := getEmailSender(c, in)
	if err != nil {
		return log.Error("Email provider integration not found: %v", err, c)
	}

	err = provider.Send(message)
	if err != nil {
		return log.Error("Email provider error: %v", err, c)
	}

	return nil
})

Send email with appropriate provider

View Source
var Subscribe = delay.Func("email-subscribe", func(c context.Context, in integration.Integration, l email.List, sub email.Subscriber) {
	log.Debug("Adding subscriber %s to external email list %s", sub.Email, l, c)
	provider, err := getEmailMarketer(c, in)
	if err != nil {
		log.Error("Email provider integration not found: %v", err, c)
		panic(err)
	}
	err = provider.Subscribe(&l, &sub)
	if err != nil {
		log.Error("Email provider error: %v", err, c)

	}
})

Subscribe contact to mailing list with appropriate provider

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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