Problem in sending an email in android - android

I have a query. In my application, on click of a button, I start an intent to send email. I have set the "To" list, "Subject" and attachment in my coding. Now my problem is that when the email screen is shown, user should not be able modify the email contents nor should he be allowed to remove the attachment. Only he sould be able to click on "Send" button. Please help me out in this. Thanks in advance.

user should not be able modify the
email contents nor should he be
allowed to remove the attachment.
The user can do whatever the user wants. It is the user's device. It is the user's email account.
If you wish to force the email to be unmodified, you will have to send the email directly via SMTP, collecting email account information from the user.

Related

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.

How to send an email to specific address on submit button press of contact form page in android app without invoking gmail app in contact form app?

I am making contact form for my app in which user will enter its name, mobile no, email id, and message along with it, user will choose a subject from spinner, after that when user click on Submit button the whole contact form information that user entered will send to my email id as67735#gmail.com without invoking gmail app in contact form app. How can I acheive this? I tried many blogs and tutorials to fulfill this task but in all places they described it by invoking gmail app in this contact form app but I want this functionality without invoking gmail app in my app. On pressing submit button a mail should be fired to my mail id.

Send email automatically and append string before sending

I have an Android app which has an ability to genereta some reports and gives user an option to email those reports. After chooser opens and user picks Gmail to send an email, gmail app opens and user can see a message. It would be ideal if user would not be able to see a message becouse I would like to append a little commercial below a message and would not like to allow user to delete that small commercisl. For example:
Email body:
"Some generated report.
This report was generated by XYZ APP. Download app and create your own reports!"
The part which says which app generated report should be hidden somehow so user can't see it and that small advertisement is send together with the real message.
How can I accomplish that? Thank you!
How can I accomplish that?
Send the email yourself (JavaMail, via your Web server, etc.). If the user is sending the email, via the user's own email client and the user's own email account, the user has the right to see the message and edit it as desired.

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"));

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