Here the configuration of mailSender used in jugevents .
<!-- start mail section -->
<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
<!-- here your smtp server -->
<property name="host"><value>smtp.gmail.com</value></property>
<!-- Parameters for SMTP AUTH -->
<property name="username"><value>yourUsername</value></property>
<property name="password"><value>yourPassword</value></property>
<property name="javaMailProperties">
<props>
<prop key="mail.smtp.auth">true</prop>
<!-- used by gmail smtp server -->
<prop key="mail.smtp.starttls.enable">true</prop>
</props>
</property>
</bean>
Fail doing it you will face into the following exception
org.springframework.mail.MailSendException; nested exception details (1) are: Failed message 1: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first z37sm13522675ikz.1 at
Thanks to Lucio for the help.
9 commenti:
Very very very very very very very very very very very very very very very very thanks for that post. After searched in many places and thinking in writing a class for do the mail send with TLS, I find it.
Very thank you, man.
WOW I am really happy to having helped you to solve your problem. I think it would be good if every developer, after spent some time in solving a bug, would find some time to write the solution in a blog or java website.
Muchas gracias por el tip, es muy util
Thanks a million!
yeah thats awesome man, thanks a million for that solution!!!
Thanks a lot buddy.
Hi, Thanks for your post.You code helped but I could not get it to work as is.I made some modifications and it worked :
username@gmail.com
password
true
true
465
javax.net.ssl.SSLSocketFactory
false
gracias
Thanks , man it's working
Posta un commento