Documentation
¶
Overview ¶
Package email provides email sending capabilities for TurboScript.
This package supports multiple email drivers including SMTP, Mailgun, AWS SES, SendGrid, and Postmark. The driver is selected based on the configuration and can be overridden on a per-message basis.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Attachment struct {
Filename string `json:"filename"`
Content string `json:"content"` // base64 encoded
ContentType string `json:"contentType,omitempty"`
}
Attachment represents an email attachment.
type Request ¶
type Request struct {
To []string `json:"to"`
From string `json:"from,omitempty"`
Subject string `json:"subject"`
Content string `json:"content"`
HTML string `json:"html,omitempty"`
Driver string `json:"driver,omitempty"`
CC []string `json:"cc,omitempty"`
BCC []string `json:"bcc,omitempty"`
Attachments []Attachment `json:"attachments,omitempty"`
}
Request represents an email to be sent.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides email sending functionality.
func NewService ¶
func NewService(cfg *config.EmailConfig) *Service
NewService creates a new email service instance.
func NewServiceWithServerConfig ¶
func NewServiceWithServerConfig(cfg *config.EmailConfig, serverCfg *config.ServerConfig) *Service
NewServiceWithServerConfig creates a new email service instance with server configuration.
Click to show internal directories.
Click to hide internal directories.