I'm asking if there's a method to send an email automatically from my app in Android Studio without opening Gmail with "Intent.ACTION_SEND" and without turning on "less secure apps" on Google account settings. My app has already a Google sign-in method connected with Firebase Project.
Asked
Active
Viewed 552 times
2 Answers
2
Is it possible
Yes, it is possible. There are decades of libraries for this on the web.You should have tried surfing for a while.
How to Implement
You should use this library.Code is given below
SendMail mail = new SendMail("youremail@email.com", "yourEmailsPass",
"otherUser'sEmail@email.com",
"Title",
"Yes, it's working well\nI will use it always.:)");
mail.execute();
References

Sambhav Khandelwal
- 3,585
- 2
- 7
- 38
-
I checked the video, but I saw that you must turn on "less secure apps". So I hope there's a different way to do this. – Giosuè Giordano Jan 25 '22 at 16:28
-
then i am sorry to say but you cannot do it without less secure apps.but you surely can send the mail – Sambhav Khandelwal Jan 26 '22 at 05:42
1
When it comes to Firebase and sending emails to users, the best option that you have is to use Trigger Email Extension from Firebase. There is no need to open your Gmail account in order to send an email. To implement the extension please follow the steps that are explained in the following article:

Alex Mamo
- 130,605
- 17
- 163
- 193