rcptto

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package rcptto includes utility functions for handling lists of recipients

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(rcptTos []*addr.RcptTo, rcptTo string, esmtpArgs string) (out []*addr.RcptTo)

Add adds rcptTo with esmtpArgs to the slice rcptTos and returns the new slice. If rcptTo is already in rcptTos, it is not added a second time. In this case the exiting ESMTP argument gets updated.

func Copy

func Copy(rcptTos []*addr.RcptTo) (out []*addr.RcptTo)

Copy creates an independent copy out of rcptTos

func Del

func Del(rcptTos []*addr.RcptTo, rcptTo string) (out []*addr.RcptTo)

Del removes rcptTo from the slice rcptTos and returns the new slice. When rcptTo is not part of rcptTos, the slice does not get altered.

func Diff

func Diff(orig []*addr.RcptTo, changed []*addr.RcptTo) (deletions []*addr.RcptTo, additions []*addr.RcptTo)

Diff calculates the difference between orig and changed. The order of orig and change does not matter. A change in the ESMTP argument results in the deletion of the original RcptTo and addition of then RcptTo with the new ESMTP argument.

func Has

func Has(rcptTos []*addr.RcptTo, rcptTo string) bool

Has returns true when rcptTo is in rcptTos

Types

This section is empty.

Jump to

Keyboard shortcuts

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