简体   繁体   中英

Send email using android app

I am making an app that provides users access to my store. And in this they will input their name number and sizes. I want this information then emailed to me. How do I do this. I have been looking at how to send emails thorugh apps but cant find exactly what I am looking for . I have been trying to add to the following code with little luck.

    Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);  
    emailIntent.setType("plain/text");    
    startActivity(emailIntent);

Its not much I know. I know how to add a message field and all with

emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, aEmailList);  
emailIntent.putExtra(android.content.Intent.EXTRA_CC, aEmailCCList);  
emailIntent.putExtra(android.content.Intent.EXTRA_BCC, aEmailBCCList);  
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "My subject");  

But I dont want all that to be their when the Email is sent. I don't want the used to see that, I just want them to see their options which is then made into text and sent

If you are going to use the share intent there is nothing you can hide from the user. Instead you will have to write some code to send out an email from within your app. You can probably search and use the code from an opensource mail client like K9 . What you can also do , if you have a webserver, send all the data using a simple post to your server.

Also it would be good if you let the user know what you are sending. Angry Birds is awesome , but Angry Users wont be fun :-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM