Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseTemplate ¶
ParseTemplate parses a template string and applies the provided data to it, returning the resulting string. If there is an error during the parsing or execution of the template, it returns an empty string and the error.
Types ¶
type Service ¶
Service defines an interface for sending emails. It provides a method to send an email with a given context and email details.
func NewEmailService ¶
NewEmailService creates a new email service based on the given provider.
func NewSESEmailService ¶
NewSESEmailService creates a new instance of emailServiceImpl. It initializes the service with the given AWS client. This function returns an Service interface that wraps the emailServiceImpl.
func NewSMTPEmailService ¶
NewSMTPEmailService initializes and returns a new instance of smtpServiceImpl. It sets up the SMTP authentication using the provided configuration and constructs the server address.