|
|
|
@ -65,19 +65,11 @@ func (s *AuthPostmanServer) ReadMessage(offset int64) error { |
|
|
|
|
// postman := telegram.NewService(s.config.Telegram.ChatToken)
|
|
|
|
|
// message := postman.NewMessage(s.config.Telegram.ChatID, text)
|
|
|
|
|
// ers := postman.SendMessage(message)
|
|
|
|
|
// if ers != nil {
|
|
|
|
|
// s.logger.Print(ers)
|
|
|
|
|
// } else {
|
|
|
|
|
// s.logger.Printf("send code %s to %s completed", amsg.Code, amsg.Email)
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
postman := smtp.NewService(s.config.Smtp.Host, s.config.Smtp.Port, s.config.Smtp.Sender, s.config.Smtp.Password) |
|
|
|
|
message := smtp.NewMessage("Confirmation code", text) |
|
|
|
|
message.AppendRecipient(msg.Email) |
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
smtpSender := smtp.NewService(s.config.Smtp.Host, s.config.Smtp.Port, s.config.Smtp.Sender, s.config.Smtp.Password) |
|
|
|
|
ers := smtpSender.Send(message) |
|
|
|
|
ers := postman.Send(message) |
|
|
|
|
if ers != nil { |
|
|
|
|
s.logger.Print(ers) |
|
|
|
|
} else { |
|
|
|
|