我通过 Cloudbees 注册了 Sendgrid。我正在尝试通过具有以下属性的 sendgrid SMTP API 发送电子邮件:
port=587
host=smtp.sendgrid.net
username=[username generated by cloudbees, cloudbees_[myid] ]
password=[the password i login to cloudbees grandcentral]
并收到以下异常。
Caused by: javax.mail.AuthenticationFailedException: 535 Authentication failed: Bad username / password
at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:823)
at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:756)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:673)
at javax.mail.Service.connect(Service.java:295)
at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:389)
... 38 更多
密码应该是什么?用户名错了吗?
提前致谢, 艾尔