Documentation ¶
Index ¶
- func LoggedCloser(closer io.Closer)
- type Mail
- type MailRequest
- func (mr MailRequest) As(sender string) MailRequest
- func (mr MailRequest) Check() error
- func (mr MailRequest) ConvertToMail(content io.Reader) Mail
- func (mr MailRequest) Data(payload any) MailRequest
- func (mr MailRequest) From(fromEmail string) MailRequest
- func (mr MailRequest) Template(template string) MailRequest
- func (mr MailRequest) To(recipients ...string) MailRequest
- func (mr MailRequest) WithSubject(subject string) MailRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggedCloser ¶ added in v1.11.0
LoggedCloser closes a ressources with handling error
Types ¶
type MailRequest ¶ added in v1.11.0
type MailRequest struct { Payload any Tpl string FromEmail string Sender string Subject string Recipients []string }
MailRequest describes an email to be sent
func NewMailRequest ¶ added in v1.11.0
func NewMailRequest() MailRequest
NewMailRequest create a new email
func (MailRequest) As ¶ added in v1.11.0
func (mr MailRequest) As(sender string) MailRequest
As set sender
func (MailRequest) Check ¶ added in v1.11.0
func (mr MailRequest) Check() error
Check checks if current instance is valid
func (MailRequest) ConvertToMail ¶ added in v1.11.0
func (mr MailRequest) ConvertToMail(content io.Reader) Mail
ConvertToMail convert mail request to Mail with given content
func (MailRequest) Data ¶ added in v1.11.0
func (mr MailRequest) Data(payload any) MailRequest
Data set payload
func (MailRequest) From ¶ added in v1.11.0
func (mr MailRequest) From(fromEmail string) MailRequest
From set from
func (MailRequest) Template ¶ added in v1.11.0
func (mr MailRequest) Template(template string) MailRequest
Template set template
func (MailRequest) To ¶ added in v1.11.0
func (mr MailRequest) To(recipients ...string) MailRequest
To add recipients to list
func (MailRequest) WithSubject ¶ added in v1.11.0
func (mr MailRequest) WithSubject(subject string) MailRequest
WithSubject set subject
Click to show internal directories.
Click to hide internal directories.