Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailAddress ¶
type EmailRequest ¶
type EmailRequest struct {
From EmailAddress `json:"from"`
To []EmailAddress `json:"to"`
Subject string `json:"subject"`
HTML string `json:"html"`
}
type EmailSender ¶
type EmailSender interface {
SendEmail(recipientEmail string, subject string, htmlContent string) error
}
EmailSender defines an interface for sending emails, allowing for different implementations.
type MailerSendClient ¶
type MailerSendClient struct {
APIKey string
BaseURL string
FromEmail string
FromName string
SubjectLine string
}
func NewMailerSendClient ¶
func NewMailerSendClient(apiKey string) *MailerSendClient
func (*MailerSendClient) SendEmail ¶
func (m *MailerSendClient) SendEmail(recipientEmail string, subject string, htmlContent string) error
SendEmail sends an email using the MailerSend API.
func (*MailerSendClient) SetSender ¶
func (m *MailerSendClient) SetSender(email, name string)
SetSender sets the from email address and name
func (*MailerSendClient) SetSubject ¶
func (m *MailerSendClient) SetSubject(subject string)
SetSubject sets the email subject line
type SMTPClient ¶
type SMTPClient struct {
Config SMTPConfig
}
SMTPClient is a client for sending emails via SMTP.
func NewSMTPClient ¶
func NewSMTPClient(config SMTPConfig) *SMTPClient
NewSMTPClient creates a new SMTP client.
type SMTPConfig ¶
type SMTPConfig struct {
Host string
Port string
Username string
Password string
From string // Sender email address
}
SMTPConfig holds configuration details for the SMTP server.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides email sending functionality with template support
func NewService ¶
NewService creates a new email service
func (*Service) GetAvailableTemplates ¶
GetAvailableTemplates returns a list of available template names
Click to show internal directories.
Click to hide internal directories.