Send Email from Spring Boot Application

Sdílet
Vložit
  • čas přidán 10. 11. 2020
  • In this video, you will learn to send an email from a Gmail account using a Java and Spring Boot framework.
    GitHub Link: bit.ly/3pjXOEA
    Other Video:
    -----------------------------------------------------------------------
    Docker VS Kubernetes VS Docker Swarm - • Docker VS Kubernetes V...
    Docker Compose Tutorial with commands and Example - • Docker Compose Tutoria...
    How to Install Docker in Window 10 - • How to Install Docker ...
    Docker Tutorial - Most used Docker Commands With Examples | Docker Training | Daily Code Buffer - • Docker Tutorial - Most...
    How to install Kafka using Docker & Docker Compose in any Operating System | Windows | MacOS | Linux - • How to install Kafka u...
    How to Deploy Quarkus App in Docker - • How to Deploy Quarkus ...
    How to implement Logging in SPRING BOOT - • How to implement Loggi...
    How to Push and Pull a Docker Image from Docker Hub - • How to Push and Pull a...
    Create Docker Image without Dockerfile in Spring Boot - • Create Docker Image wi...
    Follow us on :
    --------------------------------------------------------
    Website: www.dailycodebuffer.com/
    Facebook: / dailycodebuffer
    Twitter: / dailycodebuffer
    Instagram: / dailycodebuffer
    GitHub: github.com/dailycodebuffer
    My Laptop :
    ------------------------------------------------------
    ASUS ROG Zephyrus G14, 14" - amzn.to/3tMb1I6
    ASUS ROG Zephyrus G14, 14" (US) - amzn.to/3xa6X6m
    Audio Gear :
    ------------------------------------------------------
    Maono AU-A04 Condenser Microphone : amzn.to/32FOpwI
    Maono AU-A04 Condenser Microphone (US) :amzn.to/3awzUj7
    Secondary Audio :
    ------------------------------------------------------
    Maono AU-100 Condenser Clip On Lavalier Microphone : amzn.to/3sGIbYd
    Recommended Books:
    ------------------------------------------------------
    Mastering Spring Boot 2.0 (Kindle): amzn.to/3tHJV4L
    Mastering Spring Boot 2.0 (US) : amzn.to/3tHNUy5
    Building Microservices(Kindle) : amzn.to/3gsA1jL
    Building Microservices(US) : amzn.to/3dDnfNn
    Spring Boot in Action : amzn.to/2Qo6YTM
    Spring Boot in Action (US) : amzn.to/32DkeX9
    Spring Microservices in Action : amzn.to/3gsA3rT
    Spring Microservices in Action(US): amzn.to/32G3Hl7
    Music:
    -------------------------------------------------------
    Hear the Noise (Sting): czcams.com/users/audiolibrary...
    “Sound effects obtained from www.zapsplat.com“
    #Email #SpringBoot #DailyCodeBuffer
  • Věda a technologie

Komentáře • 132

  • @DailyCodeBuffer
    @DailyCodeBuffer  Před 3 lety +1

    Follow me on Twitter: twitter.com/DailyCodeBuffer

  • @kirane5911
    @kirane5911 Před 2 lety +1

    Thank you so much Brother for explaining well about this project

  • @eufraniodiogo50
    @eufraniodiogo50 Před 3 lety +2

    Super simple and super well explained

  • @fridrixengels6943
    @fridrixengels6943 Před 2 lety +1

    Thank you bro. It helped me a lot.

  • @mostafadaneshvar3146
    @mostafadaneshvar3146 Před rokem

    i dont know why when i watch your video my problems solved in less than 15 minutes!!thanks daily code

  • @pragmaticcoder6910
    @pragmaticcoder6910 Před 2 lety +1

    Thanks a lot for this tutorial. Well explained !! :) Could you please make a video on Spring boot-Kafka to trigger email notifications?

  • @axelltejada6265
    @axelltejada6265 Před 2 lety

    Excellent video bro, it helped me a lot

  • @mithatakbulut6490
    @mithatakbulut6490 Před 3 lety

    You saved my day bro. thanks

  • @funcoding1797
    @funcoding1797 Před 2 lety +4

    Your knowledge and mastery as well as your teaching method are excellent.
    God bless you.

  • @sathyanarayananm2480
    @sathyanarayananm2480 Před 3 lety +8

    Just nw my team given this task to do, thanks alot bro,,, keep going and help many to learn

  • @phuocsanghuynh2935
    @phuocsanghuynh2935 Před 2 lety

    Very easy to understand from your explanation! Have a nice day guy! from Vietnam with love

  • @bharathn1720
    @bharathn1720 Před 3 lety

    thanks brother, for letting know this

  • @carlosalbertomassavanhanej3330

    Congrats nice and explicative video!!! Keep doing.

  • @chaithanyakarkera154
    @chaithanyakarkera154 Před rokem

    Nicely explained 👏

  • @michas83
    @michas83 Před 11 měsíci

    thx Man :)I have fighted with it 2 days.

  • @Gamer_with_knowledge
    @Gamer_with_knowledge Před 2 lety

    Superb Man.
    Thanks a lot , the most simple explanation over the internet. :)

  • @thetechthirsty713
    @thetechthirsty713 Před 3 lety +1

    I just got work to send mail from spring boot and this video dropped. Thanks a lot

  • @srichaitanya6378
    @srichaitanya6378 Před 3 lety +1

    Thanks a lot !! how to integrate JSP or thymeleaf to this project

  • @teoman436
    @teoman436 Před 3 lety

    Thanks a lot!:)

  • @kirwakelvinkering3122
    @kirwakelvinkering3122 Před 2 lety +1

    Thank you Sooo much for this channel ,, as I take tutorials on the same , I gain more interest in watching more , your explanation is that , simple demistifyning confusions once and for all ,, the best of all the Spring boot totorials .

  • @srigakolapuatchuthasai5929

    Nice explan, thanks a lot

  • @Fighterfilms1
    @Fighterfilms1 Před 2 lety

    Great tutorial man! Will this allow emails to be sent to anyone or only to other gmail accounts?

  • @M3M3sG4m3Rs
    @M3M3sG4m3Rs Před 3 lety

    thanks man you helped me a lot

  • @svalyavasvalyava9867
    @svalyavasvalyava9867 Před 9 měsíci

    awesome tutorial, thank you 😊

  • @bilaldekar2560
    @bilaldekar2560 Před 2 lety

    thanks you for the video, how can i use this behind proxy?

  • @abhinav9469
    @abhinav9469 Před 3 lety

    Easy and accurate tutorial

  • @habtomgebre1348
    @habtomgebre1348 Před 2 lety

    thanks for the interesting concept, but I have a question, assume we have received daily data with the attached link in the same outlook email that link has a data that needs to save on the database, this email is coming every day and the database needs updated data, which means for every that email coming data the with the database also updated. how can implement this ?.

  • @ariagaluhp
    @ariagaluhp Před 2 lety

    Nice video sir! Is there any more similar tutorial where we can send validation of user register via email with REST API ?

  • @ismailarifm5041
    @ismailarifm5041 Před 3 lety +1

    It's simple and straight to the point ! Please make more videos like this. I smashed the red button :-D

  • @javainfinity596
    @javainfinity596 Před 3 lety

    I Love You videos

  • @sarulatha7374
    @sarulatha7374 Před 2 lety

    Hi, Could you please make a video abt how to send an email using SES service in AWS using springboot

  • @weixiangng8279
    @weixiangng8279 Před 8 měsíci

    How about for outlook and without authentication?

  • @diegoramos27
    @diegoramos27 Před 2 lety

    How do you handle bounces sir ?

  • @abhisheknarwal4437
    @abhisheknarwal4437 Před 3 lety

    I am generating a pdf by using iText and tryin to send that as an attachment in the mail but everytim I get a file not found exception, could you please help me with that?

  • @pranoydas9654
    @pranoydas9654 Před rokem

    For outlook , how can you configure?

  • @ViralShortsOfDuniya
    @ViralShortsOfDuniya Před 2 lety

    Could you help me how to remove CC? Because when i keep cc as null or empty it takes the e-mail id of the From mail id!

  • @naranisrimani7343
    @naranisrimani7343 Před rokem

    Can we select gradle project and do the same, does it works plss reply I need ur help pls

  • @AnkitKumar-wk1ux
    @AnkitKumar-wk1ux Před 3 lety

    hello, i'm getting this "java.nio.file.InvalidPathException: Trailing char < > at index 16: E:\\emailsent.gif" error while sending mail with attachment.

  • @ayeshaazmiprity3762
    @ayeshaazmiprity3762 Před 2 lety

    How can I read a . eml which saved in my desktop ?

  • @AshutoshKumar-jn2zz
    @AshutoshKumar-jn2zz Před 2 lety

    Sending mail From Outlook what changes we need to do?

  • @antonyjees543
    @antonyjees543 Před 2 lety

    Good video 👍 good explanation

  • @kumarpoobendra
    @kumarpoobendra Před 2 lety

    Hi bro,
    Do you have an idea how to send the attachment with password protected using java spring boot..

  • @ranjeevtiwari6976
    @ranjeevtiwari6976 Před 2 lety

    Thanks for this application. Can you please also help to understand how you can pass an html template in body instead of passing simple textmessage.

  • @kirwakelvinkering3122

    Hello daily code ? How do you handle nested Json from the client using @RequestBody ? Like am having a client sending nested Json to the spring boot server ,and am stuck.

  • @robinrajlouis9183
    @robinrajlouis9183 Před 2 lety

    How can send mail to span folder

  • @YoutuberMaskarado
    @YoutuberMaskarado Před 3 lety

    Awesome! Clear and the most importantly... fast. Do you know how to make body html templates also? The package structure and everything else?

    • @Bimal_Behera
      @Bimal_Behera Před 3 lety

      You can use thymeleaf engine to do so, and I don't get what do you mean by package structure.

    • @YoutuberMaskarado
      @YoutuberMaskarado Před 3 lety +1

      @@Bimal_Behera thank you, I managed to do it with freemarker. About the package structure what I want to say is: What is the best folder structure in Eclipse to do it. What I did: I put the templates on resource/template, and the Mail class on src/utility, and I don't know if it is the best choice for that.

  • @juned6076
    @juned6076 Před 2 lety

    Great work

  • @anupjuly
    @anupjuly Před 2 lety

    the modern mail service providers offer encrypted alternatives on different ports that use SSL/TLS to encrypt all the data being sent over the wire or to upgrade an existing unencrypted connection to SSL/TLS. Plz upload/refer the video if you have.

  • @nihatismayilzade2076
    @nihatismayilzade2076 Před rokem

    Hello Shabir than you for informative content. But I ask you a question. How to integrate "email subscription" for spring boot project? For example I want to do any newsletter who subscribed my site and those person aware of its newsletter. thank you in advance

  • @abitham8175
    @abitham8175 Před rokem

    how to store this email in database with attachment and retrieve the email and send it via email???

  • @vinothinimano6433
    @vinothinimano6433 Před 2 lety

    how to use to send outlook mail in this code

  • @Mersal-tq9lm
    @Mersal-tq9lm Před 2 lety

    Good one👍

  • @chisomemmanuel6160
    @chisomemmanuel6160 Před 8 měsíci

    Very Awesome tutorial ❤, thank you very much sir but please what theme do you use in your intellij IDE

  • @dogranmol
    @dogranmol Před 2 lety

    is there a limit on how many free mails you can send

  • @babyscookbook2751
    @babyscookbook2751 Před 2 lety

    How to send email using apache kafka...?
    Please reply

  • @oshogarg5215
    @oshogarg5215 Před 3 lety

    Thank you so much brother .

    • @DailyCodeBuffer
      @DailyCodeBuffer  Před 3 lety

      Thanks

    • @oshogarg5215
      @oshogarg5215 Před 3 lety

      @@DailyCodeBuffer I want to give you one suggestion

    • @DailyCodeBuffer
      @DailyCodeBuffer  Před 3 lety

      Tell me

    • @oshogarg5215
      @oshogarg5215 Před 3 lety +1

      Please create Spring Boot project videos from basic to advance level projects only using Spring Boot Only just like you created a Simple Email Cliet using Spring Boot .A personsearching for Spring Boot Projects may not be interested in Docker+Spring Boot or AWS+Spring Boot.

  • @-Altera-
    @-Altera- Před 9 měsíci

    How would you send a timed/scheduled email at a specific date-time? So for example, if you have a database that has stored information on a specific date and time (e.g. for a task of some sort), how would you send an email to a recipient (responsible for that task) let's say 24 hours before that date-time value. This date-time could be an upcoming appointment or a deadline and the email should remind the recipient of this 24 hours prior that date-time.
    For simplification, let's say that a database table has the following columns: name, emailAddress, taskName, date-time. The software would then based on the email and date-time values of the row same row send a mail to the email address 24 hours prior to the date-time value.
    A tutorial or something of the like would be nice but I appreciate any response to the question :).

  • @mertcomert7893
    @mertcomert7893 Před 2 lety +1

    Hi
    How to create xlsx file injected by database and directly add as attachment to email and sending through smtp?
    Could you show us on video?

    • @ViralShortsOfDuniya
      @ViralShortsOfDuniya Před 2 lety

      Use Spring Workbook(apache.poi) concept for xlxs file, once the xlxs file is created attach the file as byteArray

  • @sumantasamal6761
    @sumantasamal6761 Před 3 lety

    Nice video..

  • @pulakbordoloi4918
    @pulakbordoloi4918 Před 2 lety

    It was nice video sir ,but i am encountering an error ,the service is not appearing in eureka but it is succesfully sending the mail,what can be issue sir?

  • @shubhambhatt329
    @shubhambhatt329 Před 9 měsíci

    Thnks man

  • @ikeshavgiri
    @ikeshavgiri Před 2 lety

    How to send email with your actual name instead of email id as your name ?

  • @YoutuberMaskarado
    @YoutuberMaskarado Před 3 lety +1

    Hi, Im getting this error: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.0 Must issue a STARTTLS command first. v16sm4395084qth.51 - gsmtp

    • @YoutuberMaskarado
      @YoutuberMaskarado Před 3 lety +2

      Found the solution. I had to disable the checking in Avast program on Windows for sending emails.

  • @start1learn-n171
    @start1learn-n171 Před 16 dny

    Tq

  • @VishalPatel-mi4ui
    @VishalPatel-mi4ui Před 2 lety

    while creating app password, gmail says "error creating app password" and show nothing else.

  • @vemularasagna2307
    @vemularasagna2307 Před 3 lety

    How to send only sender name without displaying send email address

  • @sujithg5873
    @sujithg5873 Před 3 lety

    Bro it useful

  • @garikinarajesh1999
    @garikinarajesh1999 Před rokem

    I'm getting error like "Required Application specific password" ?

  • @bharathirv8479
    @bharathirv8479 Před 3 lety

    Great explanation, however gmail mail server is using tls protocol so we can use tls config and can able to trigger mail fro springboot apps, but some other provider like godaddy is using ssl encryption for their smtp servers for that how can we trigger, i searched lot but none of the resources available with solution. Can you able to provide if there is any way.

    • @simon8284
      @simon8284 Před 3 měsíci

      Bro from where did you learnt Spring Projects? What paid courses, articles, yt_playlists, etc... you studied from?

    • @bharathirv8479
      @bharathirv8479 Před 3 měsíci

      @@simon8284 many yt available bro, daily code buffer, java techie, amigoscode,coding streams,bouli ali etc

  • @ainigma100
    @ainigma100 Před 3 lety +1

    Thank you for your video! Assume that we have the following case:
    We want to send an email with a PDF attachment without having the PDF stored locally. For instance, we query the database table "EMPLOYEE" and we want the results to be saved in a PDF and then attach this PDF to the email. Keep in mind that we do not want to create the PDF file locally because the server might not allow the web service to create files locally. Maybe, we will have to attach multiple files as well. Is this possible?

    • @RutgerOlthuis
      @RutgerOlthuis Před 3 lety

      I doubt that's even possible. You need some temp folder where you can store the PDF.

    • @sujeetpalei5098
      @sujeetpalei5098 Před 2 lety

      Did you find any solution to this

    • @ainigma100
      @ainigma100 Před 2 lety +1

      @@sujeetpalei5098 Not really. I had to save the file in the tmp folder of the server. After I send the email, I delete the PDF from the tmp folder

    • @sujeetpalei5098
      @sujeetpalei5098 Před 2 lety

      @@ainigma100 do you have any reference code?

    • @ainigma100
      @ainigma100 Před 2 lety +2

      @@sujeetpalei5098 To tell you the truth at the moment I do not have it. Whenever I find time, I will post here. Keep in mind that I cannot post the whole code …

  • @jax40001
    @jax40001 Před 2 lety

    How to send email via outlook

  • @Spider-Man_67
    @Spider-Man_67 Před měsícem

    Thanks bro, maza aagya, bas thoda aur cheezo ko explain kiy karo like technical details.

  • @vietdungduong4790
    @vietdungduong4790 Před 3 lety +1

    Authentication failed; nested exception is javax.mail.AuthenticationFailedException: failed to connect, no password specified?
    help me

    • @DailyCodeBuffer
      @DailyCodeBuffer  Před 3 lety

      Could you please make sure you have entered credentials correctly and all config is correct 🙏

    • @carlosalbertomassavanhanej3330
      @carlosalbertomassavanhanej3330 Před 3 lety +1

      besides what @DailyCodeBuffer said, I would recommend you to be sure that you are using the app password instead of your email password

  • @sakillaskar7632
    @sakillaskar7632 Před rokem

    Why ur channel is underrated 😭?

  • @sankalparora9374
    @sankalparora9374 Před rokem

    How did you Autowired JavaMailSender without having it's been anywhere in the project. My INtelliJ throws error for that.

    • @DailyCodeBuffer
      @DailyCodeBuffer  Před rokem

      What exact error are you getting?

    • @sankalparora9374
      @sankalparora9374 Před rokem

      ​@@DailyCodeBuffer IntelliJ was showing error - but when I built, it worked.
      Now, the question is who is creating the bean... Spring boot or any component of it ?

  • @patricio758
    @patricio758 Před 3 lety

    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

  • @vijaykumar-wu9jc
    @vijaykumar-wu9jc Před 3 lety +1

    Hi am getting this exception pls help
    org.springframework.mail.MailAuthenticationException: Authentication failed; nested exception is javax.mail.AuthenticationFailedException: 535-5.7.8 Username and Password not accepted.

    • @DailyCodeBuffer
      @DailyCodeBuffer  Před 3 lety +1

      Have you enabled teo factor authentication? If not please add and check again. Hopefully it will resolve

    • @vijaykumar-wu9jc
      @vijaykumar-wu9jc Před 3 lety +2

      @@DailyCodeBuffer thank u for quick response , i fixed it

  • @bars1628
    @bars1628 Před 2 lety +1

    okey

  • @theWorldOfIss
    @theWorldOfIss Před 10 měsíci +1

    How to perform in 2023 🎉

  • @21dsbannachouhan
    @21dsbannachouhan Před 8 měsíci

    moj kar di ✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨✨

  • @harishbabu1920
    @harishbabu1920 Před 2 lety

    Simple and Amazing ....Thanks a lot @Daily Code Buffer💌

  • @simon8284
    @simon8284 Před 3 měsíci

    Bhai code explain krna tha, akele classes ke names padh ke code nahi krna tha...

  • @albertonengues6046
    @albertonengues6046 Před 2 lety

    HI i using spring webflux but i have this problem:
    Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

  • @tareeqazeez7344
    @tareeqazeez7344 Před rokem

    Hi, I am facing this below exception , how can i resolve it ?
    530 5.7.0 Must issue a STARTTLS command first. be11-20020a170902aa0b00b001b06c106844sm18078646plb.151 - gsmtp

  • @cesarbranco1889
    @cesarbranco1889 Před 2 lety +1

    Can you help?
    Description:
    Field mailSender in com.example.saj.email.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)