Send Email Using Spring Boot | Gmail SMTP | Java Mail Sender
In this video i demonstrate how to send simple email using Spring Boot. I will be using Java Mail Sender Dependency and gmail smtp to configure spring boot application for sending mail.
Source Code : https://github.com/arjungautam1/SpringBootEmail
➡️ Support me
PayPal : https://paypal.me/codewitharjun
Patreon : https://www.patreon.com/codewitharjun
➡️ Subscribe : https://www.youtube.com/codewitharjun
Stay Connected :
➡️ LinkedIn : https://np.linkedin.com/in/arjungautam1
➡️ Github : https://github.com/arjungautam1
Join Community :
➡️Discord : https://discord.gg/cn2x3jhMW4
Follow me on :
➡️ Medium: https://codewitharjun.medium.com/
➡️ Dev.to : https://dev.to/codewitharjun
#springboot #java #arjuncodes #CodeWithArjun
by Code With Arjun
linux smtp client
As far as I know app password is no longer supported by GMail. So this simply won't work.
Bro i added the dependency and also updated my project still i am not getting the classes inside the dependency should i need to download its jar file or is there any other option available?
Ive been craving for this type of tutorial! Thanks a lot!!!
wonderful
thanks for sharing
you re the man
great video, thank you
amazing video, congratulations and thnks
java: cannot access jakarta.mail.internet.MimeMessage
class file for jakarta.mail.internet.MimeMessage not found. I am getting this error
Thank you for the tutorial working perfectly…
Thanks for this video, I was facing issue regarding mail properties and trying to fix it from last 3days, but with watching your video its quick solved….Thank you so much…..
Excellent!
awesome. Thanks for the wonderful explanation, its very helpful.
me ayudo mucho!! Thanks!!!
Thanks!
Hi Arjun , i am facing this error . Spring Boot java: cannot access javax.mail.internet.MimeMessage class how to resolve
org.springframework.mail.MailSendException: Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. u4-20020adfdd44000000b003063176ef09sm2300085wrm.6 – gsmtp
I'm getting an error like this, any ideas?
Nice!
Dear Sir,
I have a doubt regarding the tutorial I followed. Despite following it carefully, I encountered an error message stating "unable to find valid certification path to requested target" and "unable to find valid certification path to requested target; message exceptions (1) are: Failed message 1: jakarta.mail.MessagingException: Could not convert socket to TLS." I believe the issue may be related to the configuration of my certificate. Could you please provide a tutorial on how to configure the certificate?
Thank you.
and if we want multiple users to send email ?
No words to explain the simplest way of your explanation bro. Cheers!
Nice video.! But My App doesn't send an email. But in mockMvc Test, it works using same method(to send email) . I don't know why.. (3am now..) .
If someone know about this situatioin, plz reply….(working in Test app, but not working Spring boot app)
very useful!
thanks man that was helpful!!
hi, can someone help, i cant find app passwords in my account settings anymore
Thanks! Worked perfectly!
can you help?
i am getting this error
Field mailSender in com.spring.email.EmailSenderService required a bean of type 'org.springframework.mail.javamail.JavaMailSender' that could not be found.
The injection point has the following annotations:
– @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'org.springframework.mail.javamail.JavaMailSender' in your configuration.
Spring Boot just makes it so easy, and you make it much easier to understand. Thank you so much
How to read email in inbox ?
Anyone having 530 Error just follow these steps-
1)On your computer, open Gmail.
2)In the top right, click Settings Settings and then See all settings.
3)Click the Forwarding and POP/IMAP tab.
4)In the "POP download" section, select Enable POP for all mail or Enable POP for mail that arrives from now on.
5)At the bottom of the page, click Save Changes.
this should help
BEST
SAVED ME!!! TKS MAN, UR THE BEST
Thank you bro. It's very useful. Instead of setting up node js backend server, it's a very easy method using spring boot.
Super class
can i run the project in the eclipse ide?
pass otp instead of body
mailSender is not initialized/constructed
if we need to add logo or favicon then how? plz show me
Thanks a lot, great help! It actually worked perfectly 🙂
Thank you
How to set timeout. I need to increase to 5000 timeout