I'm not able to send a mail using ovh smtp server and spring integration.
Configuration looks good to me, what am I missing?
<int-mail:outbound-channel-adapter
id="myOutboundMailChannelAdapter"
channel="outboundMailChannel"
mail-sender="mailSender" />
<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<property name="host" value="ns0.ovh.net"/>
<property name="port" value="587"/>
<property name="username" value="myUsername"/>
<property name="password" value="myPass"/>
<property name="javaMailProperties">
<props>
<prop key="mail.transport.protocol">smtp</prop>
<prop key="mail.smtp.auth">true</prop>
<prop key="mail.smtp.starttls.enable">true</prop>
<prop key="mail.debug">true</prop>
</props>
</property>
</bean>
following the detailed log:
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle]
> DEBUG SMTP: useEhlo true, useAuth true
> DEBUG SMTP: trying to connect to host "ns0.ovh.net", port 587, isSSL false
> 220 ns0.ovh.net You connect to mail191 ESMTP
> DEBUG SMTP: connected to host "ns0.ovh.net", port: 587
> EHLO Marcello-PC.lan
> 250-ns0.ovh.net You connect to mail191
> 250-AUTH LOGIN PLAIN
> 250-AUTH=LOGIN PLAIN
> 250-STARTTLS
> 250-8BITMIME
> 250 SIZE 109000000
> DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN"
> DEBUG SMTP: Found extension "AUTH=LOGIN", arg "PLAIN"
> DEBUG SMTP: Found extension "STARTTLS", arg ""
> DEBUG SMTP: Found extension "8BITMIME", arg ""
> DEBUG SMTP: Found extension "SIZE", arg "109000000"
> STARTTLS
> 220 ready for tls
> EHLO Marcello-PC.lan
> 250-ns0.ovh.net You connect to mail191
> 250-AUTH LOGIN PLAIN
> 250-AUTH=LOGIN PLAIN
> 250-8BITMIME
> 250 SIZE 109000000
> DEBUG SMTP: Found extension "AUTH", arg "LOGIN PLAIN"
> DEBUG SMTP: Found extension "AUTH=LOGIN", arg "PLAIN"
> DEBUG SMTP: Found extension "8BITMIME", arg ""
> DEBUG SMTP: Found extension "SIZE", arg "109000000"
> DEBUG SMTP: Attempt to authenticate using mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM
> DEBUG SMTP: AUTH LOGIN command trace suppressed
> DEBUG SMTP: AUTH LOGIN succeeded
> DEBUG SMTP: use8bit false
> MAIL FROM:
> 552 sorry, your envelope sender domain must exist [mail191] (#5.7.1)
> DEBUG SMTP: got response code 552, with response: 552 sorry, your envelope sender domain must exist [mail191] (#5.7.1)
> RSET
> 250 flushed
> DEBUG SMTP: MessagingException while sending, THROW:
> com.sun.mail.smtp.SMTPSendFailedException: 552 sorry, your envelope sender domain must exist [mail191] (#5.7.1)