-1

When users register with my application, I want my application to automatically send some verification code to user email. I will generate verification code, but i don't know how to automatically send it to user email.

Give me some solution guys!!

NOTE!!!!!!! I am not asking how to send email to someone which is like choosing email app and it populates subject and body in the application.

Kisung Tae
  • 75
  • 1
  • 3

3 Answers3

1

Then you have to use web services. when user register with your app, you store user registration information in server database. while inserting user record in database insert verification code in one column. (write a code to generate verification code in web service it self.) after successful inserting row in database. you can easily pick email and verification code. Now you have all details of user. Write a code in web service to send verification code in email to user.

Ashish Kudale
  • 1,230
  • 1
  • 27
  • 51
1

Normally its done from the server side. Generating authentication token and sending it to a mail address using an SMTP server. for example mail in php.

If you really want to do it on android side which doesnt open any application and directly sends a mail to gmail, here is an alternative I could find.

Sending Email in Android using JavaMail API without using the default/built-in app

Community
  • 1
  • 1
Ramesh
  • 1,287
  • 1
  • 9
  • 14
0

firebase email verification is the best to verify the email without using any custom created service (API)

Asadullah Mumtaz
  • 171
  • 1
  • 14
  • Hello and welcome to Stackoverflow. Could you please be a bit more specific? why is it "the best"? Do you have any proof? links maybe? how can it be used? Please show some examples, guides, or whatever. Please have a look here on how to write a good answer: https://stackoverflow.com/help/how-to-answer – Alexander May 08 '18 at 19:28
  • actually, I am finding a solution for verification of email address without any restful API in the meantime I found this solution for email verification. is aw its demo on youtube that's why I recommended it here. But till now I have implemented it by myself. here is the link from where I saw this demo : [link](https://www.youtube.com/watch?v=phHY-1ADsQo) – Asadullah Mumtaz May 09 '18 at 16:10
  • BTW thanyou so much for encouraging me for joining the StackOverflow forum and hoping that ill learn much from this forum to enhance my knowledge – Asadullah Mumtaz May 09 '18 at 16:13