0

I would like to send user proposal details to the company apps email address when he/she clicks on submit How can I do this? I have followed these Send Email Intent But it does not give what I really want.

James Z
  • 12,209
  • 10
  • 24
  • 44
Viva
  • 79
  • 9
  • would you give more details of how you get this user proposal details and how exactly you want to send it, You can post your code here so you can get help easily – Badr Oct 09 '17 at 12:28
  • Ok I have Text Input layouts where the user fills in there details which I will then paste it on a fillable form pdf which needs to be sent to my email soon as he clicks submit button. The pdf should be sent to the email in the background without disrupting any activities – Viva Oct 09 '17 at 13:03
  • 1
    Please don't add any details into comments. Use the edit button in your question. – James Z Oct 09 '17 at 14:14

1 Answers1

0

You can try this to send Email

Intent email = new Intent(Intent.ACTION_SEND);  
email.setType("plain/text");
email.putExtra(Intent.EXTRA_EMAIL, new String[]{ email@email.com});  
email.putExtra(Intent.EXTRA_SUBJECT, "subject");    
if (URI != null) {
    email.putExtra(Intent.EXTRA_STREAM, URI);
}
email.putExtra(Intent.EXTRA_TEXT, "message");
startActivity(Intent.createChooser(email, "Choose an Email client :")); 

URI => will be your pdf file path to be send with email.

If you want to send File along with the Email Click Here

  • Ok I have Text Input layouts where the user fills in there details which I will then paste it on a fillable form pdf which needs to be sent to my email soon as he clicks submit button. The pdf should be sent to the email in the background without disrupting any activity of the app – Viva Oct 09 '17 at 14:11
  • Please find edit in the code above to send the PDF file you generated. Hope it will solve your problem. – Hector Morris Oct 10 '17 at 06:00