Android calls system mail, send mail to specified mailbox

Source: Internet
Author: User

In the project, the last one to contact us, the request is to click the number and email address can send mail, this time to solve the solution there are two, one is to call the system to send mail software, you can add a mailbox account can send mail, the second is to use JavaMail to send mail. In the online various Baidu, also has the test, the discovery all can not send the mail, also modifies such as QQ or 163 mailbox of what management password, opened the POP3,, SMAP service, can not receive the mail, later colleague reminds me, the system comes with is the Google provides the Mail software, estimates in the domestic cannot use, I try to download QQ mailbox, try a bit really useful, the following posted by the predecessor to the call system to send the mailbox software, code as follows

Mail.setonclicklistener (NewOnclicklistener () {@Override Public voidOnClick (View v) {Intent I=NewIntent (intent.action_send); //I.settype ("Text/plain");//Simulator Please use this lineI.settype ("message/rfc822");//Use this line on a real machineI.putextra (Intent.extra_email,NewString[] {"[email protected]" }); I.putextra (Intent.extra_subject,"your suggestions"); I.putextra (Intent.extra_text,"we very much hope to get your suggestion!!! "); StartActivity (Intent.createchooser (i,"Select Email application."));  }          }); 

Android calls system mail, sends mail to specified mailbox

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.