1

I am developing one application in that I am sending email, in that there is one registration form and in that some fields are included that is first_name, last_name, state, phone_number, date, time and phone_number. So problem is that I have successfully done with email in that to, bcc, cc, subject and message that part I have covered, but I also want the information which I have filled in the registration form, the information should be displayed in the message area in the email.

TN888
  • 7,659
  • 9
  • 48
  • 84
Nilesh Sasane
  • 85
  • 1
  • 1
  • 7
  • Refer to this http://stackoverflow.com/questions/2197741/how-to-send-email-from-my-android-application/2197841#2197841 – Sunil Mishra Jul 25 '13 at 11:30

2 Answers2

1

use this code:

intent.putExtra(Intent.EXTRA_EMAIL  , "receipentEmailId@abc.com");
intent.putExtra(Intent.EXTRA_SUBJECT, "add any subject u want");
intent.putExtra(Intent.EXTRA_TEXT   , "<here goes the content like firstName.getText().toString()>"");
Mr_Hmp
  • 2,474
  • 2
  • 35
  • 53
  • thank you charlie, i have done this already...i want to send the registration form information along with Text message. – Nilesh Sasane Jul 25 '13 at 11:46
  • @charlie Why you rejected my edit ? Please remove unneeded text "regards Charlie", because it's spam ! – TN888 Jul 25 '13 at 11:58
0
Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri
                            .fromParts("mailto","abc@mail.com", null));
emailIntent.putExtra(Intent.EXTRA_SUBJECT,"Your Subject");
emailIntent.putExtra(Intent.EXTRA_TEXT,"Your Content !");
startActivity(Intent.createChooser(emailIntent,"Send email..."));
selva_pollachi
  • 4,147
  • 4
  • 29
  • 42
  • Thanks selva, i have clearly mention above, i have done with this, i just want to extra information other than to,bcc,cc,subject,message,attachment in my email. i have mention those fields in problem definition. now waiting for positive reply. – Nilesh Sasane Jul 25 '13 at 11:59
  • String content="FirstName :"+firstName.getText().toString()+"\n"+"LastName :"+secName.getText().toString()+"\n"+....... then emailIntent.putExtra(Intent.EXTRA_TEXT,content); – selva_pollachi Jul 25 '13 at 12:05
  • thanks selva..but it gives error on getText message, the error is "The method getText() is undefined for the type String"... why it is happend? – Nilesh Sasane Jul 25 '13 at 12:16
  • thanks selva i have done it successfully, i have taken all the parameters separately and then i have just concatinate the variables instead of whole. Thanks a lot. – Nilesh Sasane Jul 26 '13 at 03:42
  • hi selva....now i want to send simple email using SMTP how to do it. if there is any link or examples you have then please help me...i am waiting... – Nilesh Sasane Jul 26 '13 at 06:59