Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Content ¶
type Content struct {
FromUserFriendlyName string
From string
To string
ToFriendlyName string
CC []string
Subject string
Body string
}
Content : email information
type ISender ¶
type ISender interface {
// SendEmail : Sends a plain text email to the client
SendEmail(c *Content) error
// SendHTMLEmail : Sends an email that is formatted with HTML
SendHTMLEmail(c *Content) error
}
ISender : Email Sender Generic interface that basically can be implemented for many email providers
Forexample => SendGrid , SES , SNS ...etc
func NewSendGridSender ¶
NewSendGridSender : email sender that implements i sender (via send_grid api)
type MockSender ¶
func NewMockSender ¶
func NewMockSender() *MockSender
func (*MockSender) SendEmail ¶
func (m *MockSender) SendEmail(c *Content) error
SendEmail : Sends a plain text email to the client
func (*MockSender) SendHTMLEmail ¶
func (m *MockSender) SendHTMLEmail(c *Content) error
SendHTMLEmail : Sends an email that is formatted with HTML
type SendGridSender ¶
type SendGridSender struct {
// contains filtered or unexported fields
}
SendGridSender : send grid email sender
func (*SendGridSender) SendEmail ¶
func (s *SendGridSender) SendEmail(c *Content) error
SendEmail : Sends a plain text email to the client
func (*SendGridSender) SendHTMLEmail ¶
func (s *SendGridSender) SendHTMLEmail(c *Content) error
SendHTMLEmail : Sends an email that is formatted with HTML
Click to show internal directories.
Click to hide internal directories.