Android实现带附件的邮件发送功能

2019-12-10 19:19:33丽君

用户授权类:

package com.gloomyfish.jmail.demo; 
 
 
import javax.mail.Authenticator; 
import javax.mail.PasswordAuthentication; 
 
 
class PopupAuthenticator extends Authenticator { 
  private String userName; 
  private String password; 
  public PopupAuthenticator(String userName, String password) 
  { 
    this.userName = userName; 
    this.password = password; 
  } 
  public PasswordAuthentication getPasswordAuthentication() { 
    return new PasswordAuthentication(userName, password); 
  } 
} 

特别注意:
在android上发送邮件必须自己导入三个相关的JAVA文件

Android实现带附件的邮件发送功能

以上就是本文的全部内容,希望对大家的学习Android软件编程有所帮助。



注:相关教程知识阅读请移步到Android开发频道。