Store file/attachment in draft using Gmail? - android

like :
we can send an email with an attachment in android app by using Intent
So :
Is this possible to store attachment in draft using email through code ??

we can send an email with an attachment in android app by using Intent
No, you can ask the user to send an email with an attachment using an Intent. Whether the user actually follows through on that request is up to the user.
Is this possible to store attachment in draft using email through code ??
No. Not all email clients even have the concept of "store attachment in draft".

You can send email using intent through gmail but AFAIK you can not save email as draft programmatically. No email application's provide such functionality to save the email programmatically in draft.

Related

Registering intent filter to open email attachment from Gmail and native mail through my app

In my app I am generating custom files with my own extension.
I have to send these files as an email attachment, and receiver's side I have to open this attachment through my application.
For this I got a reference.
Android: Registering Intent Filter to open email attachment with my app
This is working fine for Gmail attachments and not for native mail clients.
means I am able to open Gmail attachments but can't native mail attachments.
Can anyone suggest the way which will work for all email clients.
Regards,
Pradeep_ch.
Can anyone suggest the way which will work for all email clients.
There is no way that will work with all email clients. There is no requirement that an email client retain your file's extension in the Uri that it uses with ACTION_VIEW.

obtain a callbacks of sending mail

I am developing an application that needs to send inside an ordinary email.
The mail must be sent with the account set up on your smartphone. Through Intent.ACTION_SEND sending the mail goes smoothly.
Is there a way to know if the email was sent and if the sending has been successful?
The mail must be sent with the account set up on your smartphone
You assume the existence of such an account, and this is not a valid assumption. Bear in mind that just because they may have a Google account (e.g., for use with the Play Store), they may not be using Gmail, and there is nothing forcing users to use their Android device for any other email.
Is there a way to know if the email was sent and if the sending has been successful?
No.
ACTION_SEND does not send email. ACTION_SEND lets the user share content of a specified MIME type. Whether the user chooses to send via email, who they send the email to, whether they change the content, whether they send the email at all, and so forth is up to the user, and your app is not informed of any of this.

How can I check if emails can be sent from my phone?

I have an app that will send an email from the server if the app user does not have their email set up on their phone. Otherwise it will be sent through the android device.
What methods are there to check if email is configured on the phone?
Thanks
Another way to let the user to decide to send the email is to just create and use an Email Intent. That way the user sees that you want to send an email, and can choose what email client sends the email.
Example:
startActivity(new Intent(Intent.ACTION_SENDTO, Uri.parse("mailto:to#gmail.com"));

sending an email automaticlly

I have using some examples on this site to create an email class for sending a CSV file out to an email. It works find, sends the file correctly
The last line in the code reads
context.startActivity(Intent.createChooser(emailIntent, "Send mail..."));
This as far as I understand opens the email app and lets the user send the email. I was looking to see if it was possible to send the email automatically. ie without going to the email client and not leaving my app
Thanks for your time
sending mail using the javamail-api
see this post
Send auto email programmatically
Sending Email in Android using JavaMail API without using the default/built-in app

How to extract recipients email id from email intent in android after user has sent mail using android app?

I have created an app which alows user to send mails. The message text is prefilled with data from the app. I would like to know the recipient email ids the user send the mail to. Is it possible for me to get back recipient email ids when user sends mail using email Intent.
Is it possible for me to get back recipient email ids when user sends mail using email Intent.
Fortunately, this is not possible, as this would be a significant privacy violation.

Categories

Resources