我正在制作一个应用程序,该应用程序忘记了将邮件背景发送到特定邮件 ID 的密码时间。它正在将 Gmail 发送到另一封邮件(也包括 gmail),但我们的客户需要客户端域 ID 到其他邮件(例如 support@example.net 使用后台发送邮件)我可能尝试多次邮件不发送但我在 logcat 中收到一条错误消息
浏览器中使用的javax.mail.AuthenticationFailedException 链接显示警告
我正在制作一个应用程序,该应用程序忘记了将邮件背景发送到特定邮件 ID 的密码时间。它正在将 Gmail 发送到另一封邮件(也包括 gmail),但我们的客户需要客户端域 ID 到其他邮件(例如 support@example.net 使用后台发送邮件)我可能尝试多次邮件不发送但我在 logcat 中收到一条错误消息
浏览器中使用的javax.mail.AuthenticationFailedException 链接显示警告
public class SendMessageService extends Service{
public void sendMessage(){
Intent send = new Intent(Intent.ACTION_SENDTO);
String uriText = "mailto:" + Uri.encode("email@gmail.com") +
"?subject=" + Uri.encode("the subject") +
"&body=" + Uri.encode("the body of the message");
Uri uri = Uri.parse(uriText);
send.setData(uri);
startActivity(Intent.createChooser(send, "Send mail..."));
}
}
您可以在此处阅读有关服务的一些关键信息。大部分代码取自此示例,但您应该能够对其进行定制以满足您的需求。
编辑1:
这也可能是这个问题的重复,但有一些区别。