我已经为我的Sonar
实例配置了电子邮件设置Configuration--> general Seetings --> Email
。
详细配置如下。
SMTP host: mysmtpserver.com<br>
SMTP Port: 25<br>
Use secure connection: No<br>
SMTP username: Blank<br>
SMTP password:Blank<br>
From address:noreply@mycompany.sonar.com<br>
Email prefix: [SONAR]
我已经保存了这些设置,当我尝试对其进行测试时,我在声纳屏幕中收到以下错误
org.apache.commons.mail.EmailException: Sending the email to the following server failed : mysmtpserver.com:25
下面是异常的stracktrace
2012.06.12 12:10:11 ERROR o.s.p.e.EmailNotificationChannel Fail to send test email to: myname@mycompany.com
org.apache.commons.mail.EmailException: Sending the email to the following server failed : mysmtpserver.com:25
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1242) ~[na:na]
at org.apache.commons.mail.Email.send(Email.java:1267) ~[na:na]
at org.sonar.plugins.emailnotifications.EmailNotificationChannel.send(EmailNotificationChannel.java:192) ~[na:na]
at org.sonar.plugins.emailnotifications.EmailNotificationChannel.sendTestEmail(EmailNotificationChannel.java:210) ~[na:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_26]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_26]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_26]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_26]
at org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:559) [jruby-complete-1.6.1.jar:na]
at org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:404) [jruby-complete-1.6.1.jar:na]
at org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:79) [jruby-complete-1.6.1.jar:na]
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:205) [jruby-complete-1.6.1.jar:na]
at org.jruby.ast.CallThreeArgNode.interpret(CallThreeArgNode.java:61) [jruby-complete-1.6.1.jar:na]
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:103) [jruby-complete-1.6.1.jar:na]
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71) [jruby-complete-1.6.1.jar:na]
at org.jruby.ast.RescueNode.executeBody(RescueNode.java:216) [jruby-complete-1.6.1.jar:na]
at org.jruby.ast.RescueNode.interpretWithJavaExceptions(RescueNode.java:120) [jruby-complete-1.6.1.jar:na]
at org.jruby.ast.RescueNode.interpret(RescueNode.java:110) [jruby-complete-1.6.1.jar:na]
at org.jruby.ast.BeginNode.interpret(BeginNode.java:83) [jruby-complete-1.6.1.jar:na]
引起:com.sun.mail.smtp.SMTPSendFailedException: 550 5.7.1 匿名客户端无权作为此发件人发送(通过 tpa)
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1515) ~[na:na]
at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:1321) ~[na:na]
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:637) ~[na:na]
at javax.mail.Transport.send0(Transport.java:189) ~[na:na]
at javax.mail.Transport.send(Transport.java:118) ~[na:na]
at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1232) ~[na:na]
... 248 common frames omitted
注意:相同的 SMTP 服务器设置适用于Gerrit
并且Jenkins
不需要任何身份验证。
任何帮助,将不胜感激。