你好,游客 登录 注册 搜索
背景:
阅读新闻

Android中使用JavaMail发送Email带群发加附件

[日期:2013-04-09] 来源:Linux社区  作者:拳四郎 [字体:大 中 小]

布局文件

主界面的布局文件,非常简单。

 <RelativeLayout xmlns:Android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MailActivity" >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:text="@string/hello_world" />

    <Button
        android:id="@+id/btnSend"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignParentTop="true"
        android:layout_marginTop="19dp"
        android:text="Send" />

</RelativeLayout>

运行效果: 

 

点击发送之后

更多Android相关信息见Android 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=11

linux
本文评论   查看全部评论 (3)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款
第 3 楼
* 匿名 发表于 2013/11/29 16:26:09
不错,能够发送邮件,谢谢
第 2 楼
* 匿名 发表于 2013/11/1 22:50:19
Android发送Email
http://3aj.cn/article/224.html
第 1 楼
* 匿名 发表于 2013/4/13 10:09:59
你好,我现在正在弄这个,纯文本就行,加附件就不行了,是什么情况?你的jar包能发给我吗?1284603184@qq.com