Documentation
¶
Index ¶
- func SendMessage(config *EmailConfig, message *EmailMessage) (id string, response string, err error)
- func SendMessageMailgun(config *EmailConfig, message *EmailMessage) (id string, response string, err error)
- func SendSmtp(config *EmailConfig, message *EmailMessage) error
- func ValidateEmailAddress(email string) bool
- type EmailConfig
- type EmailMessage
- type Mailgun
- type Smtp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendMessage ¶
func SendMessage(config *EmailConfig, message *EmailMessage) (id string, response string, err error)
Envia un mensaje por SMTP o Mailgun, segun este la configuracion
func SendMessageMailgun ¶
func SendMessageMailgun(config *EmailConfig, message *EmailMessage) (id string, response string, err error)
func SendSmtp ¶
func SendSmtp(config *EmailConfig, message *EmailMessage) error
func ValidateEmailAddress ¶
Valida que los caracteres en la direccion de correo sean ASCII
Types ¶
type EmailConfig ¶
type EmailConfig struct { Smtp Smtp `json:"smtp" bson:"smtp"` Mailgun Mailgun `json:"mailgun" bson:"mailgun"` }
func (*EmailConfig) IsSmtp ¶
func (e *EmailConfig) IsSmtp() bool
func (*EmailConfig) Validate ¶
func (e *EmailConfig) Validate() error
type EmailMessage ¶
type EmailMessage struct { From string `json:"from"` To string `json:"to"` Tos []string `json:"tos"` Subject string `json:"subject"` Body string `json:"body"` Attachments []string `json:"attachments"` BodyHtml string `json:"bodyHtml"` }
func (*EmailMessage) Validate ¶
func (t *EmailMessage) Validate() error
Click to show internal directories.
Click to hide internal directories.