I have configured the email settings for my Sonar
instance under Configuration--> general Seetings --> Email
.
The configuration details are as below.
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]
I have saved these settings and when I try to test it, I get the below error in Sonar screen
org.apache.commons.mail.EmailException: Sending the email to the following server failed : mysmtpserver.com:25
Below is the stracktrace of the exception
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]
Caused by: com.sun.mail.smtp.SMTPSendFailedException: 550 5.7.1 anonymous client does not have permissions to send as this sender (by 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
Note: The same SMTP server settings work fine for Gerrit
and Jenkins
without requiring any authentication.
Any help would be appreciated.