Documentation
¶
Index ¶
- type Builder
- func (b *Builder) Attach(paths ...string) *Builder
- func (b *Builder) Build() contractsnotification.MailMessage
- func (b *Builder) From(address string) *Builder
- func (b *Builder) Header(key, value string) *Builder
- func (b *Builder) Html(html string) *Builder
- func (b *Builder) HtmlView(view string, with map[string]any) *Builder
- func (b *Builder) ReplyTo(address string) *Builder
- func (b *Builder) Subject(subject string) *Builder
- func (b *Builder) Text(text string) *Builder
- func (b *Builder) TextView(view string, with map[string]any) *Builder
- func (b *Builder) To(addresses ...string) *Builder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder is the fluent builder returned by NewMessage.
func NewMessage ¶
func NewMessage() *Builder
NewMessage returns a fluent builder for a MailMessage. Every method returns the same builder so calls can be chained; call Build() to finish.
func (n *InvoicePaid) ToMail(_ notification.Notifiable) notification.MailMessage {
return mail.NewMessage().
Subject("Invoice Paid").
Html("<p>Thanks!</p>").
Build()
}
func (*Builder) Build ¶
func (b *Builder) Build() contractsnotification.MailMessage
Build returns the finished MailMessage.
Click to show internal directories.
Click to hide internal directories.