Linux serverNETWORK ADMINISTRATIONSsmtp server liux

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

source

by Code With Arjun

linux smtp client

41 thoughts on “Send Email Using Spring Boot | Gmail SMTP | Java Mail Sender

  • 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?

  • java: cannot access jakarta.mail.internet.MimeMessage
    class file for jakarta.mail.internet.MimeMessage not found. I am getting this error

  • 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…..

  • 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?

  • 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.

  • 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)

  • hi, can someone help, i cant find app passwords in my account settings anymore

  • 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

  • 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

  • Thank you bro. It's very useful. Instead of setting up node js backend server, it's a very easy method using spring boot.

  • Thanks a lot, great help! It actually worked perfectly 🙂

Comments are closed.