Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. sendgrid.go: error:net/http: Client Transport of type init.failingTransport doesn't support CancelRequest; Timeout not supported; response:<nil>
  2.  
  3. sg := sendgrid.NewSendGridClientWithApiKey("string")
  4. email := sendgrid.NewMail()
  5. email.AddTo(req.Email)
  6. email.SetSubject("Confirm your registration at domain")
  7. email.SetFrom("noreply@domain.com")
  8. email.SetFromName("domain")
  9. email.SetText(url)
  10. if r := sg.Send(email); r == nil {
  11. log.Infof(ctx, "email sent")
  12. } else {
  13. log.Errorf(ctx, "email not sent %v", r)
  14. w.WriteHeader(http.StatusInternalServerError)
  15. return
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement