send

package
v0.0.0-...-3890dee Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:          "send",
	Short:        "Send email messages from multiple senders",
	SilenceUsage: true,
	RunE: func(cmd *cobra.Command, args []string) error {
		log := cmd.Parent().Flag("log-level").Value.String()
		n, _ := strconv.ParseInt(log, 10, 8)
		if err := logger.Init(zerolog.Level(n)); err != nil {
			return err
		}

		q, err := queue.New(
			senders,
			receivers,
			subject,
			host,
			textContent,
			queue.WithHTML(htmlContent),
			queue.WithRateMinute(perMinute),
			queue.WithRateDaily(perDay),
			queue.WithWorkers(workers),
			queue.WithReadReceipts(readReceipts),
		)
		if err != nil {
			return err
		}
		return q.Run()
	},
}

Cmd is the command defenition for the "multi" command. "multi" allows users to send email messages from multiple senders.

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