cloudbees - SendGrid 的身份验证问题

标签 cloudbees

我通过 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 更多

密码应该是什么?用户名有误吗?

提前致谢, 铝

最佳答案

不要使用您的 cloudbees 凭据连接到 sendgrid,而是使用运行时注入(inject)的凭据(请阅读 http://wiki.cloudbees.com/bin/view/RUN/SendGrid )。您还应该使用资源绑定(bind)将 Sendgrid 作为 JNDI JavaMail session 直接注入(inject),因此您的设置更加简单

关于cloudbees - SendGrid 的身份验证问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16217781/

相关文章:

cloudbees - 如何查明工作空间和构建工件在 CloudBees Jenkins 上占用了多少空间

java - 使用 Java EE 将文件存储在云端

jenkins - Cloudbees Jenkins插件无法启动容器

CloudBees 的沙箱/JRE 限制?

jenkins-cli 在 Cloudbees : "no such job" 上构建

groovy - cloudbees、groovy、作业、文件夹 : How to determine the job result, 如果作业在 cloudbees 文件夹中?

liferay - 在 cloudbees 上使用 liferay 部署 portlet

cloudbees - Bitbucket 不会触发 Jenkins 在 CloudBees 上构建

build - Cloudbees 上的 Redis 版本已过时?

MySql/Cloudbees VARCHAR 作为外键