package org.apache.android.mail;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
public class SendMail extends Activity {
/**
* Called with the activity is first created.
*/
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.main);
final Button send = (Button) this.findViewById(R.id.send);
final EditText userid = (EditText) this.findViewById(R.id.userid);
final EditText password = (EditText) this.findViewById(R.id.password);
final EditText from = (EditText) this.findViewById(R.id.from);
final EditText to = (EditText) this.findViewById(R.id.to);
final EditText subject = (EditText) this.findViewById(R.id.subject);
final EditText body = (EditText) this.findViewById(R.id.body);
send.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
GMailSender sender = new GMailSender(userid.getText().toString(),
password.getText().toString());
try {
sender.sendMail(subject.getText().toString(),
body.getText().toString(),
from.getText().toString(),
to.getText().toString());
} catch (Exception e) {
Log.e("SendMail", e.getMessage(), e);
}
}
});
}
}
分享到:
相关推荐
Delphi Send Email with Gmail 2021
Android程序研发源码Android Gmail备份手机短信源码.rar
Android Gmail备份手机短信源码.zip源码资源下载Android Gmail备份手机短信源码.zip源码资源下载
Android Gmail备份手机短信源码.rar
C# 发送Email 126发送Email Gmail发送Email 我已经测试过这三种 都可以发送成功 并且可以接受成功邮件
AndroidGmail备份手机短信源码.zip
Android Gmail备份手机短信源码.zip
Android Gmail备份手机短信源码.zip项目安卓应用源码下载Android Gmail备份手机短信源码.zip项目安卓应用源码下载 1.适合学生毕业设计研究参考 2.适合个人学习研究参考 3.适合公司开发项目技术参考
google gmail android2.2 谷歌 邮箱 客户端
Gmail Email Address Grabber工具旨在从Gmail账户获取Email id。 该软件配备了最新的功能,提供了大量提取电子邮件id的选项。 它可以高效地从收件箱、发送、草稿等Gmail文件夹中批量获取电子邮件地址。 它以惊人的...
在android平台下 带附件邮件的接收和发送
Android SwipeRefreshLayout GMail下拉刷新
安卓Android源码——Gmail备份手机短信源码.zip
Android手机最详细解决Gmail绑定教程操作流程,教你轻松绑定Gmail
SEND_MAIL_MESSAGE 是一个向 gmail 发送电子邮件的函数。 您需要首先编辑 .m 文件以键入您要从中发送邮件的 gmail 帐户的参数(如用户名和密码)。
前几年的Android应用源码Demo,主要面向的是学生毕业设计学习。
用gmail实现c#邮件收发Email程序