How to use mail service
SecLoop opened this issue · 2 comments
SecLoop commented
How to use mail service
Demo
func Service() {
// Create a telegram service. Ignoring error for demo simplicity.
mailService := mail.New("xxxx@163.com", "smtp.163.com:465")
mailService.AuthenticateSMTP("", "xxxx@163.com", "xxxxxx", "smtp.163.com")
mailService.AddReceivers("xxxxx@163.com")
notify.UseServices(mailService)
// Send a test message.
err := notify.Send(
context.Background(),
"Subject/Title",
"The actual message - Hello, you awesome gophers! :)",
)
if err != nil {
log.Println(err)
}
}
nikoksr commented
Hey @SecLoop, I appreciate your efforts and contribution. With this one, I'm just not too sure how to handle it. Are you trying to provide an usage example for the email
service, or, are you asking about how to use the service correctly? Please let me know, I'd like to help you out either way.