Rick Herrick
Sr. Programmer/Analyst
Neuroinformatics Research Group
Washington University School of Medicine
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<!-- Load the NRG Mail basic application context. -->
<import resource="classpath:/META-INF/configuration/nrg-mail-context.xml" />
<!-- Bootstrap the Spring mail sender. -->
<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"
p:host="${mailserver.host}"
p:port="${mailserver.port}"
p:protocol="${mailserver.protocol}" />
</beans>
This is a really difficult error for us to be able to say much about, since it all really depends on your SMTP server configuration. What XNAT provides out of the box should work in 99% of SMTP servers that don’t require authentication. I’ve seen some cases where people have used the default mail-services-config.xml configuration, then put values into build.properties (which get carried over to services.properties in your deployed web application) that cause it to break.
For example, in one case, someone had an SMTP server that had required authentication and had these values set in the services.properties:
mailserver.host=mail.outserver.place.org
mailserver.port=25
mailserver.username=foo
mailserver.password=bar
mailserver.protocol=smtp
Mail sending started to fail. The reason was that the IT department had switched off authentication and specifying auth credentials actually broke the SMTP handshake. So we changed those values like this:
mailserver.username=
mailserver.password=
In other cases, e.g. when you’re using Gmail’s SMTP servers, the configuration has to be very precise. That’s how plugin-resources\conf\mail-services-config.smtps.sample.xml is configured. The values have to be exact for that to work:
mailserver.host=smtp.gmail.com
mailserver.port=465
mailserver.username=y...@gmail.com
mailserver.password=bar
mailserver.protocol=smtps
But it’s important to note that smtps is not really a protocol in spite of the naming. It’s really just SMTP over TLS/SSL and the port is completely dependent on the configuration of the mail server (although 465 is often used because it was originally the port specified for SMTPS, but now is registered for something else).
The point I’m trying to make in a very long-winded (long-typed?) way is highly dependent on your SMTP server configuration. The solutions for these issues will be specific to that configuration. You can try posting your mail-services-config.xml and services.properties (removing any passwords or other sensitive info) and I can have a look at it to see if anything stands out, but if there’s an issue on the server side, that would be something for your server admin or IT staff to figure out.
Sr. Programmer/Analyst
Neuroinformatics Research Group
Washington University School of Medicine
--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To post to this group, send email to
xnat_di...@googlegroups.com.
Visit this group at http://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/groups/opt_out.
I got your point; however since the same account/mail server is working fine with another xnat server (1.4 VM) that means most like the issue is on xnat configuration files. Please find attached the services.properties and your mail-services-config.xml file.
Thanks for all your help
With regards
Fahad
Rick Herrick
Sr. Programmer/Analyst
Neuroinformatics Research Group
Washington University School of Medicine
Please see the attached file
From: xnat_di...@googlegroups.com [mailto:xnat_di...@googlegroups.com]
On Behalf Of Herrick, Rick
Sent: 25 September 2013 15:00
To: xnat_di...@googlegroups.com
Subject: RE: [XNAT Discussion] sending mail not working (xnat 1.6, but not working before either)
The mail-services-config.xml was blocked by our mail server. Can you rename it with a .txt extension and resend?
<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl" p:host="${mailserver.host}" p:port="${mailserver.port}" />
Please see the attached file
From: xnat_di...@googlegroups.com [mailto:xnat_di...@googlegroups.com]
On Behalf Of Herrick, Rick
Sent: 25 September 2013 15:00
To: xnat_di...@googlegroups.com
Subject: RE: [XNAT Discussion] sending mail not working (xnat 1.6, but not working before either)
The mail-services-config.xml was blocked by our mail server. Can you rename it with a .txt extension and resend?
Rick Herrick
Sr. Programmer/Analyst
Neuroinformatics Research Group
Washington University School of Medicine