how to send mail directly in android? - android

In my requirement i need to send a mail directly when user click on the send button without using intents.I have done it with java mail API.But it ask password.Can i send without giving my password?. Is it possible with any other ways? Please tell me.I used bellow link for sending mail.
http://androidcodeexamples.blogspot.in/2012/05/android-send-email-via-gmail-actually.html
Thanking in Advance.

To answer your question I first ask you one.. Can you send mail with any of the available acount without logging in with your password? the answer is no. Because before sending mail you need to authenticate your acount with password. So this is must. If you can send mail without password then anybody can do the same which is definitely not wanted.

Can i send without giving my password?
Your mail server administrator is unlikely to allow password-less email sending, as soon a billion spammers will use your mail server.
You are welcome to write a Web service that will send email to your dedicated "contact-us" account. Or, have the Web service store the "contact-us" information elsewhere, such as a database.

You need to to authenticate to send mails. If you device already has applications you can use intents which will allow you the user to make a choice to sent mails using the desired application.
To send mails using intents
http://www.mkyong.com/android/how-to-send-email-in-android/
You can also hard code username and password and sent mails using javamail api.
Sending Email in Android using JavaMail API without using the default/built-in app
The above requires users to have gmail account.

Related

How to allow email id to receive OTP in firebase for authentication

I am developing an app wherein the users use either email and phone to perform registration.
Users can enter their email or phone for log in, I want the same OTP to be sent to mobile and email simultaneously. Please Help!
If you want to work only with Firebase Authentication, then there is not any suitable solution that meets your requirement.
Some limitations you can find with Firebase are Firebase Authentication Limits and Phone number sign-in limits.
However the alternative solution is using third-party SMS gateway. through with you can send OTP to phone number as well as to email also simultaneously.
Lets assume you already have mechanism to generate OTP and verify OTP from android app.
Now the problem is how to send OTP to the user's email.
One of solution is using MailGun service to send email from your backend.
Also, if you want to templating your email, you can use library called handlebar

How to send verification code to user email in android?

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.
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.
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
firebase email verification is the best to verify the email without using any custom created service (API)

How to send mail in background use android

I need make an application send email automatic when user click a button
I use Java mail but it not working now because policy security of google.
I can use other mail server but I not found other solution.
Please help me.

How to send Application installation friend request for app installation from mobile via sms?

I tried and researched invite friends to use application by entering their phonenumber and sending the invitation. While send refer friend by using google api it will ask from which mail id to send request then it will automattically get all the mail detais which is available in the circle of sender mail.The same way like is there any possibliity for sending app request via sms can anyone please let me know. Thanks in advance.
You should consider using AppInvite to share app

Send mail in Background for gmail id have 2-layer security

I am trying to send mail in background using the method provided in the accepted answer of This Question. Earlier the mails were sending easily. But due to new gmail's 2-step verification, the I am not able to send mail from email id having this feature. Please suggest any method or change in the code by which I can send mail through the mail id having the 2-step verification.
Thanks.
With 2 Step security, you will need to generate an application specific password, and use that from your app.
This Link will bring you to the creation page for new application specific passwords.

Categories

Resources