Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mail ¶
type Mail struct {
Domain string
Templates string
Host string
Port int
Username string
Password string
Encryption string
FromAddress string
FromName string
Jobs chan Message
Results chan Result
API string
APIKey string
APIUrl string
}
func (*Mail) ListenForMail ¶
func (m *Mail) ListenForMail()
Listen on the mail channel and send when a payload is received. The method will run continually in the background and send error or success messages on the results channel.
func (*Mail) Send ¶
Determines the appropriate method for sending an email message. If a third-party API is configured (API name is set and not "smtp", and both APIKey and APIUrl are provided), it delegates the sending to chooseAPI. Otherwise, it defaults to sending the message via SMTP.
func (*Mail) SendSMTPMessage ¶
Sends an email using SMTP with HTML and plain text bodies. It sets default sender values, configures the SMTP client, attaches any files, and sends the message using the SMTP protocol.
Click to show internal directories.
Click to hide internal directories.