可能重复: Sending电子邮件在Android中使用JavaMail API不使用默认/内置应用
我想有一个附加的音频文件在Gmail中,我与我的应用程序记录发送电子邮件。我可以直接发送邮件机器人带有附件没有得到的选项中选择发送的方法是什么? (蓝牙,等等等等)?我只是想发送的邮件带有附件上的一个按钮的点击。
I want to send an email with an attached audio file over gmail that i record with my application. Can I send a direct mail from android with attachment without getting the options to choose the method of sending? (bluetooth,etc etc ) ? I just want to send the mail with the attachment on the click of a button.
我能做到这一点与Android? 另外,我不得不为我能得到code发送邮件的Gmail上使用的机器人。
Can I do this with android? Also, i would be obliged is I could get the code for sending mail over gmail with android.
下面是发送电子邮件的背景(使用Gmail帐户)给他人着,当然带有附件的完整例子。 使用Gmail帐户发送电子邮件和附件。
here is a complete example which sends a background email (using gmail account) to others, ofcourse with attachment. Send email with attachment using GMAIL account.
查找示例项目这里
在这个项目中,你需要设置 MailSenderActivity下面的Gmail帐户信息
类
Find an example project here
in this project you need to set the following gmail account details in MailSenderActivity
class
private static final String GMAIL_EMAIL_ID = "";
private static final String GMAIL_ACCOUNT_PASSWORD = "";
private static final String TO_ADDRESSES = ""; // to email addresses separated by comma
如果您不需要ZipUtility类,删除,并用它根据您的需要
If you don't need the ZipUtility class, remove that and use it according to your need
上一篇:保存和恢复的ExpandableListActivity的展开/折叠状态状态、ExpandableListActivity
下一篇:活动开始时,Intent.ACTION_HEADSET_PLUG收到Intent、ACTION_HEADSET_PLUG