notify
notify copied to clipboard
How to use mail service
How to use mail service
Demo
func Service() {
// Create a telegram service. Ignoring error for demo simplicity.
mailService := mail.New("[email protected]", "smtp.163.com:465")
mailService.AuthenticateSMTP("", "[email protected]", "xxxxxx", "smtp.163.com")
mailService.AddReceivers("[email protected]")
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)
}
}

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.
@nikoksr This problem has been solved when using mail service. Because of the problem of SMTP SSL. Use a non SSL port. At the same time, we also hope to support SSL port. Thank you.