mirror of
https://gitea.winboll.cc/Studio/WinBoLL.git
synced 2026-08-14 05:27:10 +08:00
f91b5b1b6a
libaes模块: - 新增 APPMSGMailUtils 邮件发送工具类,基于JavaMail SMTP协议 - 新增 SMTPConfigView 邮件配置视图控件,支持服务器/端口/发件人/授权码/收件人配置 - 新增 view_smtp_config.xml 布局文件 - 添加 android-mail:1.6.7 / android-activation:1.6.7 依赖(替代javax.mail解决Android AWT兼容问题) - 添加 INTERNET / ACCESS_NETWORK_STATE 权限 aes模块: - 新增 SMTPSettingsActivity 邮件设置页面 - 新增 activity_smtp_settings.xml 布局文件 - MainActivity toolbar菜单添加"SMTP设置"入口 - AndroidManifest.xml 注册 SMTPSettingsActivity - build.gradle 添加 packagingOptions 解决META-INF重复文件冲突
103 lines
3.1 KiB
XML
103 lines
3.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<LinearLayout
|
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="16dp"
|
|
android:background="@drawable/bg_container_border">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="SMTP邮件配置"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
android:layout_marginBottom="12dp"/>
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="SMTP服务器"
|
|
android:textSize="14sp"
|
|
android:layout_marginTop="8dp"/>
|
|
|
|
<EditText
|
|
android:id="@+id/et_smtp_server"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="smtp.qq.com"
|
|
android:inputType="textUri"/>
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="端口"
|
|
android:textSize="14sp"
|
|
android:layout_marginTop="8dp"/>
|
|
|
|
<EditText
|
|
android:id="@+id/et_smtp_port"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="465"
|
|
android:inputType="number"/>
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="发件人邮箱"
|
|
android:textSize="14sp"
|
|
android:layout_marginTop="8dp"/>
|
|
|
|
<EditText
|
|
android:id="@+id/et_smtp_sender"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="your@qq.com"
|
|
android:inputType="textEmailAddress"/>
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="授权码"
|
|
android:textSize="14sp"
|
|
android:layout_marginTop="8dp"/>
|
|
|
|
<EditText
|
|
android:id="@+id/et_smtp_auth_code"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="QQ邮箱授权码"
|
|
android:inputType="textPassword"/>
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="默认收件人"
|
|
android:textSize="14sp"
|
|
android:layout_marginTop="8dp"/>
|
|
|
|
<EditText
|
|
android:id="@+id/et_smtp_recipient"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="recipient@example.com"
|
|
android:inputType="textEmailAddress"/>
|
|
|
|
<Button
|
|
android:id="@+id/btn_smtp_save"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="保存配置"
|
|
android:layout_marginTop="16dp"/>
|
|
|
|
<Button
|
|
android:id="@+id/btn_smtp_test_send"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="发送测试邮件"
|
|
android:layout_marginTop="8dp"/>
|
|
|
|
</LinearLayout>
|