Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Setting the JavaMail properties especially: mail.smtp.timeout

balteoApr 27 2011 — edited Apr 29 2011
Hello,
I am desperately trying to set the mail.smtp.timeout on a Spring JavaMailSenderImpl.
Here is what I undertook:

<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="${mail.server}"/>
<property name="port" value="${mail.port}"/>
<property name="javaMailProperties">
<props>
<prop key="mail.smtp.connectiontimeout">1000</prop>
<prop key="mail.smtp.timeout">1000</prop>
</props>
</property>
</bean>

The javaMailProperties seem to be completely ignored by my Java Mail implementation. Can anyone please help?
If I can't set this property through Spring, how can I set it?
Thanks in advance,
Julien.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 27 2011
Added on Apr 27 2011
2 comments
1,799 views