Failed to send out e-mail

com.sun.mail.smtp.SMTPSendFailedException: 553 Mail from must equal authorized user
;
nested exception is:
com.sun.mail.smtp.SMTPSenderFailedException: 553 Mail from must equal authorized user at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2057) at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1580) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1097) at javax.mail.Transport.send0(Transport.java:195) at javax.mail.Transport.send(Transport.java:124) at hudson.tasks.Mailer$DescriptorImpl.doSendTestMail(Mailer.java:525) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298) at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161) at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96) at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858) at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248) at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858) at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631) at org.kohsuke.stapler.Stapler.service(Stapler.java:225) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494) at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96) at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84) at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76) at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482) at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:370) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: com.sun.mail.smtp.SMTPSenderFailedException: 553 Mail from must equal authorized user at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1587) ... 60 more

上面的问题搞了好长时间,很多网上答案都是错的,这里非常感谢,http://www.zhihu.com/question/21774292

System Admin e-mail address  这里设置要和发件人邮箱保持一致。

1.如果不保持一致报错如下图所示:

2.邮件保持一致的配置如下图所示:

3.如果SMTP服务器配置不正确会报如下错误

比如163的邮箱配置成126的服务器smtp.126.com,那么将会报错。

Failed to send out e-mail

javax.mail.AuthenticationFailedException: 550 Óû§±»Ëø¶¨

    at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:809)

    at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:752)

    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:669)

    at javax.mail.Service.connect(Service.java:317)

    at javax.mail.Service.connect(Service.java:176)

    at javax.mail.Service.connect(Service.java:125)

    at javax.mail.Transport.send0(Transport.java:194)

    at javax.mail.Transport.send(Transport.java:124)

    at hudson.tasks.Mailer$DescriptorImpl.doSendTestMail(Mailer.java:525)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)

    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)

    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)

    at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)

    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)

    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)

    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)

    at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)

    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)

    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)

    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)

    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631)

    at org.kohsuke.stapler.Stapler.service(Stapler.java:225)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)

    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)

    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)

    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)

    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)

    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)

    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)

    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)

    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)

    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)

    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)

    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)

    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)

    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)

    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)

    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)

    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)

    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)

    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)

    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)

    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)

    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)

    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)

    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)

    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)

    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)

    at org.eclipse.jetty.server.Server.handle(Server.java:370)

    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)

    at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)

    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)

    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)

    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)

    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)

    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)

    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)

    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

    at java.lang.Thread.run(Unknown Source)

如下图所示,将邮箱改为126也测试成功了。

4.javax.mail.AuthenticationFailedException: 535 Error: authentication failed  

    535的错误是由于密码错误

Failed to send out e-mail

javax.mail.AuthenticationFailedException: 535 Error: authentication failed

    at com.sun.mail.smtp.SMTPTransport$Authenticator.authenticate(SMTPTransport.java:809)

    at com.sun.mail.smtp.SMTPTransport.authenticate(SMTPTransport.java:752)

    at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:669)

    at javax.mail.Service.connect(Service.java:317)

    at javax.mail.Service.connect(Service.java:176)

    at javax.mail.Service.connect(Service.java:125)

    at javax.mail.Transport.send0(Transport.java:194)

    at javax.mail.Transport.send(Transport.java:124)

    at hudson.tasks.Mailer$DescriptorImpl.doSendTestMail(Mailer.java:525)

    at sun.reflect.GeneratedMethodAccessor1398.invoke(Unknown Source)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

    at java.lang.reflect.Method.invoke(Unknown Source)

    at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)

    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)

    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)

    at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:120)

    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)

    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)

    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)

    at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:248)

    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)

    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:728)

    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:858)

    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:631)

    at org.kohsuke.stapler.Stapler.service(Stapler.java:225)

    at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)

    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)

    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)

    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:96)

    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:88)

    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)

    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:48)

    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)

    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)

    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)

    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)

    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)

    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:46)

    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1482)

    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)

    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1474)

    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)

    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)

    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533)

    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)

    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)

    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)

    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)

    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)

    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)

    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)

    at org.eclipse.jetty.server.Server.handle(Server.java:370)

    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489)

    at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:960)

    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1021)

    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)

    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)

    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)

    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:668)

    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)

    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

    at java.lang.Thread.run(Unknown Source)

如果邮件内容想要好看的样式请参考:jenkins+maven+git+ 邮件自动转发 持续化集成 图文教程

【总结 】550,535,553 Mail from must equal authorized user— jenkins(hudson) email163邮箱和26邮箱成功配置总结的更多相关文章

  1. com.sun.mail.smtp.SMTPSendFailedException: 553 Mail from must equal authorized user

    1.错误描写叙述 553 Mail from must equal authorized user com.sun.mail.smtp.SMTPSendFailedException: 553 Mai ...

  2. 【异常】553 Mail from must equal authorized user

    1 详细异常打印 2019-08-12 14:54:42,178 ERROR org.apache.camel.processor.DefaultErrorHandler: Failed delive ...

  3. Springboot admin 发送邮件失败:com.sun.mail.smtp.SMTPSenderFailedException: 553 Mail from must equal authorized user

    发邮件已经是老生常谈了,今天又遇到了,而且又出了各种问题.我晕哦. 我的配置是: spring.mail.host=smtp..com spring.mail.username=klxxxx spri ...

  4. 【Selenium】【BugList10】smtp发送邮件问题汇总:550/535/554

    [场景] 通过126邮箱向QQ邮箱发送HTML格式邮件 [代码1] from email.mime.text import MIMEText from email.header import Head ...

  5. jeakins配置邮件通知,附带解决535报错:authentication failed,如果发现测试邮件可以发出,项目构成无法发出邮件,请开启SSL认证,端口号改为(465),qq邮箱、163邮箱通用

    535报错解决方案:调用163邮箱服务器来发送邮件,我们需要开启POP3/SMTP服务,这时163邮件会让我们设置客户端授权码,这个授权码替代上面代码部分的passwd即可成功发送邮件 如果设置的邮箱 ...

  6. python SMTP 发送邮件 阿里企业邮箱、163邮箱 及535错误

    class SendEmail(object): def __init__(self, type, to_addr): self.to_addr = to_addr self.sys_date = t ...

  7. Laravel 5.4 使用 Mail 发送邮件获取验证码功能(使用的配置邮箱为126邮箱)

    <?php namespace App\Modules\Liveapi\Http\Controllers\Personnel; use App\Modules\Liveapi\Http\Cont ...

  8. jenkins配置邮箱服务器(126邮箱)

    安装Email Extension Plugin 安装过程容易失败,多试几次 一.开启126邮件的SMTP获取授权码 二.配置管理员邮件地址   三.设置邮件通知 四.点击Test Configura ...

  9. yii2邮件配置教程,报Expected response code 250 but got code "553"原因

    main.php(或main-local.php)中的邮件配置如下: 'mailer' => [ 'class' => 'yii\swiftmailer\Mailer', 'viewPat ...

随机推荐

  1. checkbox反复调用attr('checked', true/false)只有第一次生效

    /** * 全选 */ function checkAll() { $("input[name=ids]").attr("checked", true); } ...

  2. Android adb你真的会用吗?

    引言 本文基于Android官方文档, 以及个人工作的使用经验, 总结下adb的常用用法, 备忘. 1, adb简介 adb全名Andorid Debug Bridge. 顾名思义, 这是一个Debu ...

  3. 交互软件Axure—高保真原型

    在上一篇文章中跟大家分享了Axure7.0 的简介.基本操作和原型图的制作,主要是应用元件库里的原件进行界面元素的搭建,直至完成原型图,在最后给大家展示了高保真原型图效果.而在本次分享中,主要带领大家 ...

  4. Centos安装gcc及g++

    Centos支持yum安装,安装软件一般格式为yum install .......,注意安装时要先成为root用户. 按照这个思路,我想安装过程如下: 安装gcc:yum install gcc 安 ...

  5. 什么是哈希码(HashCode)

    什么是哈希码(HashCode) 在Java中,哈希码代表对象的特征. 例如对象 String str1 = “aa”, str1.hashCode= 3104 String str2 = “bb”, ...

  6. c++ 中const的使用

    在c++中.const是这么一个东西:假设你希望可以有一些东西是别人不能改动的,这个时候const就起作用了. const 在使用情况例如以下: a.修饰常量 const int a; int con ...

  7. artTemplate 原生 js 模板语法版

    在页面中引用模板引擎: <script src="dist/template-native.js"></script> 下载 表达式 <% 与 %&g ...

  8. WinCE 下编程须要IP地址控件咋办?

    默认控件栏里面没有IP Address Control. 可是 WinCE 系统内的网络属性中是有这种控件的,想知道怎么调用IP Address Control的吗? 先通过远程工具 Remote S ...

  9. SpeechLib 应用

    //引用组件:Interop.SpeechLib.dll //导入空间:SpeechLib //引用组件:Interop.SpeechLib.dll//导入空间:SpeechLib //1.SpVoi ...

  10. centos7.2安装社区版docker-ce-17.06.1

    先yum install安装如下包: container-selinux-2.21-1.el7.noarch libcgroup-0.41-13.el7.x86_64 libtool-ltdl-2.4 ...