Send email from app - android

I have developed an app where the user can enter an email address in the settings and on some specific event an email is sent to this address (as a notification).
The problem is: what is the best way to send an email from an app?
The best way would be to send an email from the google account of the app user but that isn't possible, right?
What I'm doing now is to do a HTTP post and send an email through php. This works great but since the app is used by many people the mail sending always gets disabled due to mass mail sending... What can I do?
Do I really need to host my own server?
Thanks for your answers.

I find sending emails to user without his interaction something similar to SPAM. I always choose the easiest and IMO honest alternative: just populate an android.content.Intent.ACTION_SEND intent with calculated data and let user decide wether send the email or not always.

Related

Android send shopping card order e-mail with attachments without using intent

I've developed an Android app with a self developed shopping cart. At the end of the purchase process I want to send an automatic email to the store owner in order to proceed with order.
Till now I used an email intent in order to force the user to send an email by themselves but the store owner got too many complaints from the users. So now I'm searching for another solution in order to do it in the background.
I've searched around but didn't find a proper solution. The email should contain a bit of text information along with 1-n attachments from users phone.
Do you have any suggestions?
Proper solution would be to send it through web service. But if you want to do it through email in background of your app you must provide possibillity to sign in to email address and send it, it would be like creating another email client.
Think about creating web service to which you will send these orders it is way better solution than sending emails from background of your app.

send an email with content that can not be edited

I make an application that allows users to send an email. when i use the usual procedure to send an email with intents the user is redirected to gmail app, and he can edit the mail. I would like to prevent the user from modifying the content of the email. would anyone know how to do it please?
This is too long for a comment, so I am posting the answer. The short answer is that if you rely on the user's phone as the email client, then there is no guaranteed way to prevent the user from editing the email message, because the Gmail app is out of your control. So, what you should instead do here is to use a server side webapp to send the message instead. As an example, I have used an email service (e.g. HawkHost) on the server side behind an Android app to send the message. With this setup, you can completely control what message gets sent from the user or on behalf of the user.

Phone no verification without sms gateway in parse

I am using a free server of parse.com for my database
I need to verify phone number of user without spending any money, because I don't want to buy an sms gateway, or mobile no. verification by using miss call service.
Any idea?
How is sending verification codes to a user's email address going to verify their phone number? The only way to verify that a user owns the phone number that they're giving is to actually call or text it and have the user respond (usually by entering a one time passcode that's in the text message or spoken in the phone call).
Parse already supports e-mail verification, so if you want to do that then you can check it out here: http://blog.parse.com/2012/04/03/introducing-app-email-settings/
Some - but not all - mobile networks let you send SMS messages via e-mail address, but support for this is rather variable. For near-certain delivery and the best user experience you'll need to use a service that lets you send SMS messages through an API, such as Twilio.

how to send mail directly in 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.

Send Email as Notification

Hey, i'm creating an application and would like to know, is there a way to automatically send an email from my application, lets say at 3:00, automatically without any input from the user. So instead of creating an intent to open gmail then user has to hit 'send' is there a way to just send it? Thanks!
This is all you need:
Sending Email in Android using JavaMail API without using the default/built-in app
Using AlarmManager to Schedule Activities on Android
I don't think so (I look forward to an answer that proves me wrong) but I think there are security concerns for that. BUT what I know you could do is make a webservice call that could send an e-mail (on behalf of the user) that has the reply-to set to the user's e-mail address.

Categories

Resources