直接连接到Gmail与Android [英] Connecting directly to GMAIL with android

查看:131
本文介绍了直接连接到Gmail与Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
  <一href="http://stackoverflow.com/questions/2020088/sending-email-in-android-using-javamail-api-without-using-the-default-built-in-a">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

这篇关于直接连接到Gmail与Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆