Announcement Announcement Module
Collapse
No announcement yet.
Properly setting the JavaMailProperties on a MailSenderImpl Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Properly setting the JavaMailProperties on a MailSenderImpl

    Hello,
    I am desperately trying to set the mail.smtp.timeout on a MailSenderImpl.
    Here is what I undertook:
    Code:
        <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?
    Thanks in advance,
    Julien.

  • #2
    HEllo

    The javaMailProperties seem to be completely ignored by my Java Mail implementation. Can anyone please help?
    How did you get such conclusion?
    Are you receiving an exception? If yes, post the complete error stack trace

    Comment


    • #3
      Sorry. It turned out the problem was elsewhere. The properties are indeed taken into account.
      Regards,
      Julien.

      Comment

      Working...
      X