How to send email using gmail SMTP server directly from your Android App?

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 พ.ย. 2024

ความคิดเห็น • 68

  • @experimentoselectricosdeju6882
    @experimentoselectricosdeju6882 ปีที่แล้ว

    It works June 2023; required 2 steps authentification gmail Sender account + create app passwords for devices

    • @nurulizzatizulkepli6728
      @nurulizzatizulkepli6728 ปีที่แล้ว

      its not work for me.. can you fixed my code?

    • @nurulizzatibintizulkeplist6275
      @nurulizzatibintizulkeplist6275 ปีที่แล้ว

      can you help me.. im not work

    • @TirthShah133
      @TirthShah133 ปีที่แล้ว

      Can you please guide me on 2-step authentication and App password method? I tired it already but didn't work. Thanks

    • @ProgrammerWorld
      @ProgrammerWorld  ปีที่แล้ว

      Please refer to the below:
      programmerworld.co/android/how-to-create-your-custom-gmail-client-android-app-using-the-new-googles-app-password-approach-for-authentication-api-34/
      Cheers
      Programmer World
      programmerworld.co
      -

  • @myclassroom1649
    @myclassroom1649 2 ปีที่แล้ว +3

    Thanks A lot man Finally I found Really grateful video I stuck for whole day and you solve my problem Thx a lot .. : )

  • @ltchanu7646
    @ltchanu7646 ปีที่แล้ว +1

    It work in 2023.4.29🤗🤗🤗 Thank you.

    • @badreddine4296
      @badreddine4296 ปีที่แล้ว

      How did it work cause the less secure app is not available anymore?

    • @ProgrammerWorld
      @ProgrammerWorld  ปีที่แล้ว

      You can check the below:
      programmerworld.co/android/how-to-create-your-custom-gmail-client-android-app-using-the-new-googles-app-password-approach-for-authentication-api-34/
      Cheers
      Programmer World
      programmerworld.co
      -

  • @theunwrittenquote
    @theunwrittenquote ปีที่แล้ว +2

    LOTS OF RESPECT AND LOVE FOR THIS ♡

  • @thanhnhan8957
    @thanhnhan8957 6 หลายเดือนก่อน +1

    Thank you

  • @hayabusa_lonely
    @hayabusa_lonely ปีที่แล้ว +1

    Thank you very very match

  • @NipunSandeepa-m1u
    @NipunSandeepa-m1u 10 หลายเดือนก่อน +3

    wow its work 2024

    • @JeremiahLaman
      @JeremiahLaman 9 หลายเดือนก่อน

      what version of android studio did you used?

    • @NipunSandeepa-m1u
      @NipunSandeepa-m1u 9 หลายเดือนก่อน

      @@JeremiahLaman Android Studio Giraffe | 2022.3.1

  • @xlivetrend
    @xlivetrend ปีที่แล้ว +1

    Thank you you save my day

  • @hashanmadusanka6128
    @hashanmadusanka6128 7 หลายเดือนก่อน +1

    Thank you so much

  • @wj-nr7bx
    @wj-nr7bx 10 หลายเดือนก่อน

    this help me alot i love u so much

  • @phantomkahn4696
    @phantomkahn4696 2 ปีที่แล้ว +1

    This worked perfectly after using app password, thank you so much!

    • @josealzugaray17
      @josealzugaray17 2 ปีที่แล้ว

      how did you do it? It does not work for me uu

    • @phantomkahn4696
      @phantomkahn4696 2 ปีที่แล้ว

      @@josealzugaray17 what error do you see?

    • @ariefariefshamsuddin350
      @ariefariefshamsuddin350 ปีที่แล้ว

      How did you do it, still does not work for me

    • @TirthShah133
      @TirthShah133 ปีที่แล้ว

      Can you please guide me on App password method? Thanks

    • @ProgrammerWorld
      @ProgrammerWorld  ปีที่แล้ว

      Please refer to the below:
      programmerworld.co/android/how-to-create-your-custom-gmail-client-android-app-using-the-new-googles-app-password-approach-for-authentication-api-34/
      Cheers
      Programmer World
      programmerworld.co
      -

  • @sebastianbraga
    @sebastianbraga 2 ปีที่แล้ว +1

    Really helpful. Thank you

  • @vulcatechdev
    @vulcatechdev 7 หลายเดือนก่อน

    Love it, is there some way to send files?

    • @ProgrammerWorld
      @ProgrammerWorld  7 หลายเดือนก่อน

      To send the files call setContent method on the mimeMessage object.
      Something like below:
      mimeMessage.setContent(MimeMultipart)
      I will try to bring up a separate tutorial on this.
      programmerworld.co/android/how-to-send-email-using-gmail-smtp-server-directly-from-your-android-app/

  • @ashishwilson7187
    @ashishwilson7187 2 ปีที่แล้ว +4

    not able to get mail do this as per google update based on 30 may 2022

    • @SamuelHernandez-pd9kj
      @SamuelHernandez-pd9kj 2 ปีที่แล้ว

      Same issue :(

    • @song-mt6bn
      @song-mt6bn 2 ปีที่แล้ว

      something?

    • @ProgrammerWorld
      @ProgrammerWorld  ปีที่แล้ว

      Below may help:
      programmerworld.co/android/how-to-create-your-custom-gmail-client-android-app-using-the-new-googles-app-password-approach-for-authentication-api-34/
      Cheers
      Programmer World
      programmerworld.co
      -

  • @chisomemmanuel6160
    @chisomemmanuel6160 2 ปีที่แล้ว

    First time commenting in my life 💕💕
    Please can you make the one that'll send one particular email message to every user of my android app maybe through firebase

    • @ProgrammerWorld
      @ProgrammerWorld  2 ปีที่แล้ว +1

      Adding all the receipients in the mimeMessage will easily send one message to all the people in one go:
      mimeMessage.addRecipient(Message.RecipientType.TO, new InternetAddress(stringReceiverEmail));
      For reference, the complete source code shown in this video is also shared in the below link:
      programmerworld.co/android/how-to-send-email-using-gmail-smtp-server-directly-from-your-android-app/
      Cheers
      Programmer World
      programmerworld.co
      -

    • @chisomemmanuel6160
      @chisomemmanuel6160 2 ปีที่แล้ว +1

      @@ProgrammerWorld Thanks 😊 man

  • @ngocmanprocoder
    @ngocmanprocoder ปีที่แล้ว

    I did, but I encountered a "Messaging Exception" error. Could you help me solve it, please? thank you so much.

    • @ProgrammerWorld
      @ProgrammerWorld  ปีที่แล้ว +1

      Check the updated version of this tutorial in the below. It may help:
      programmerworld.co/android/how-to-create-your-custom-gmail-client-android-app-using-the-new-googles-app-password-approach-for-authentication-api-34/
      Cheers
      Programmer World
      programmerworld.co
      -

  • @annetak693
    @annetak693 ปีที่แล้ว

    As of January 2023 this method works wonderfully only on the test versions. But once the version is uploaded to googleplay store, people who upload the version can't sent the messages... or to be more exact the messages never arrive. Never figured out the problem. Any updates would be very welcomed!

    • @ProgrammerWorld
      @ProgrammerWorld  ปีที่แล้ว

      I think App Password approach may be required for authentication. Below may help:
      programmerworld.co/android/how-to-create-your-custom-gmail-client-android-app-using-the-new-googles-app-password-approach-for-authentication-api-34/
      Cheers
      Programmer World
      programmerworld.co
      -

  • @TechnicalYarana
    @TechnicalYarana 2 ปีที่แล้ว +2

    sir i got it issue in my project what is javax.mail.Session 08:45

    • @ProgrammerWorld
      @ProgrammerWorld  2 ปีที่แล้ว +1

      javax.mail.Session is to create session that is an instance of email client in your App using the properties, such as hostname, password, etc.
      I hope above explanation helps.
      For reference, the complete source code shown in this video is also shared in the below link:
      programmerworld.co/android/how-to-send-email-using-gmail-smtp-server-directly-from-your-android-app/
      Cheers
      Programmer World
      programmerworld.co
      -

  • @mudasirkhan8058
    @mudasirkhan8058 2 ปีที่แล้ว +1

    i have error my Session and MimMessage Library is not import javaFx

    • @ProgrammerWorld
      @ProgrammerWorld  2 ปีที่แล้ว

      I hope below dependencies are implemented in the gradle file.
      implementation 'com.sun.mail:android-mail:1.6.6'
      implementation 'com.sun.mail:android-activation:1.6.7'
      Also, please check that below libraries are imported in your Java file.
      import javax.mail.Authenticator;
      import javax.mail.Message;
      import javax.mail.MessagingException;
      import javax.mail.PasswordAuthentication;
      import javax.mail.Session;
      import javax.mail.Transport;
      import javax.mail.internet.AddressException;
      import javax.mail.internet.InternetAddress;
      import javax.mail.internet.MimeMessage;
      For reference, the complete source code shown in this video is also shared in the below link:
      programmerworld.co/android/how-to-send-email-using-gmail-smtp-server-directly-from-your-android-app/
      Cheers
      Programmer World
      programmerworld.co
      -

  • @KnowledgeTV143
    @KnowledgeTV143 ปีที่แล้ว

    We need to add jar file in classpath?

    • @ProgrammerWorld
      @ProgrammerWorld  ปีที่แล้ว

      Not sure about the Jar file you are referring. But android-mail dependencies needs to be added in the Gradle file:
      implementation 'com.sun.mail:android-mail:1.6.6'
      implementation 'com.sun.mail:android-activation:1.6.7'
      For reference, complete source code and details shown in this video is also shared in the below link:
      programmerworld.co/android/how-to-send-email-using-gmail-smtp-server-directly-from-your-android-app/
      Cheers
      Programmer World
      programmerworld.co
      -

  • @Pasa4009
    @Pasa4009 ปีที่แล้ว

    I designed an app that shows my location information,
    I will be glad if you can help me how to write a code to send my location information as gmail.

    • @ProgrammerWorld
      @ProgrammerWorld  ปีที่แล้ว +1

      Refer to my below pages. It may help:
      programmerworld.co/android/how-to-open-and-send-email-using-the-native-client-directly-from-your-android-app-source-code/
      programmerworld.co/android/how-to-send-email-using-gmail-smtp-server-directly-from-your-android-app/
      Cheers
      Programmer World
      programmerworld.co
      -

    • @Pasa4009
      @Pasa4009 ปีที่แล้ว

      @@ProgrammerWorld thank you Professor

    • @rushikesh3363
      @rushikesh3363 ปีที่แล้ว

      Your project title?

  • @prafuldeshmukh1178
    @prafuldeshmukh1178 ปีที่แล้ว

    i was using this email send method and i have implemented this in my firebase project it worked well for some days and then google has suspended my account by saying this account was using to send spam messages does anyone knows how this happens

    • @ProgrammerWorld
      @ProgrammerWorld  ปีที่แล้ว

      It seems like there is limit for sending number of emails with this approach (limit imposed by google for security and fare use reasons). This limit as far as we know is 100 emails at a time and 500 emails in a day. Anything beyond this may make Gmail to suspend your account temporarily.
      For reference, details shown in this video is also shared in the below link:
      programmerworld.co/android/how-to-send-email-using-gmail-smtp-server-directly-from-your-android-app/
      Cheers
      Programmer World
      programmerworld.co
      -

  • @manibala5799
    @manibala5799 2 ปีที่แล้ว

    Sir I had run your program successful with changing of sender and reciver mail I'd and password but I can't get mail when press send mail button pls help me....I will send my project to your email

    • @ProgrammerWorld
      @ProgrammerWorld  2 ปีที่แล้ว

      Complete source code of this app is shared in the below page. Please check.
      programmerworld.co/android/how-to-send-email-using-gmail-smtp-server-directly-from-your-android-app/
      Cheers
      Programmer World
      programmerworld.co
      -

    • @manibala5799
      @manibala5799 2 ปีที่แล้ว

      @@ProgrammerWorld it's done but I only change tha sender reciver mail I'd and password but mail not send

    • @manibala5799
      @manibala5799 2 ปีที่แล้ว

      I send you link can you check it plssss

    • @ProgrammerWorld
      @ProgrammerWorld  2 ปีที่แล้ว

      Kindly check whether the email service provider (gmail account) permits 3rd party Apps to access the Apps or not? If it is allowed then it should work.
      Also, check the code provided by us at:
      programmerworld.co/android/how-to-send-email-using-gmail-smtp-server-directly-from-your-android-app/
      If issue still persists then copy your code here. We will check..
      Cheers
      Programmer World
      programmerworld.co
      -

    • @vanisridhar5509
      @vanisridhar5509 2 ปีที่แล้ว

      Bro, did you rectified this problem??

  • @tournamentkiller5778
    @tournamentkiller5778 2 ปีที่แล้ว +1

    Sir now this is not working properly please make new video

    • @ProgrammerWorld
      @ProgrammerWorld  2 ปีที่แล้ว +1

      Yes, google has restricted the access to less secured Apps from June 2022 onward.
      Now, an app password can be used to login. We will try to come up with an updated video on this subject soon.
      support.google.com/accounts/answer/185833
      For reference, the complete source code shown in this video is also shared in the below link:
      programmerworld.co/android/how-to-send-email-using-gmail-smtp-server-directly-from-your-android-app/
      Cheers
      Programmer World
      programmerworld.co
      -

    • @tournamentkiller5778
      @tournamentkiller5778 2 ปีที่แล้ว +2

      @@ProgrammerWorld but sir I created in kodular perfectly working sir

    • @ProgrammerWorld
      @ProgrammerWorld  2 ปีที่แล้ว +1

      Nice 👍

    • @tournamentkiller5778
      @tournamentkiller5778 2 ปีที่แล้ว

      @@ProgrammerWorld thanks sir I have a TH-cam channel technical yarana once check please

    • @yeowsongjie8186
      @yeowsongjie8186 2 ปีที่แล้ว

      @@ProgrammerWorld Sorry sir, is the video uploaded? Because i need to use it in my FYP ... Thank you so much sir

  • @sendcenter7002
    @sendcenter7002 2 ปีที่แล้ว +1

    I just got the codes. mail I wrote my own e-mail address, I edited it but it doesn't work

    • @ProgrammerWorld
      @ProgrammerWorld  ปีที่แล้ว

      You can check below also:
      programmerworld.co/android/how-to-create-your-custom-gmail-client-android-app-using-the-new-googles-app-password-approach-for-authentication-api-34/
      Cheers
      Programmer World
      programmerworld.co
      -