public class EmailWriteToFile { // 定义发件人、收件人、SMTP服务器、用户名、密码、主题、内容等 private String displayName; private String to; private String from; private String smtpServer; private String username; private String password; private String subject; private String content; private boolean ifAuth; // 服务器是否要身份认证 private String filename = ""; private Vector file = new Vector(); // 用于保存发送附件的文件名的集合 private String contentType = "text/html"; private String charset = "utf-8"; public void addFile(String filename) { file.add(filename); } public String getContentType() { return contentType; } public void setContentType(String contentType) { this.contentType = contentType; } public String getCharset() { return charset; } public void setCharset(String charset) { this.charset = charset; } /** * 设置SMTP服务器地址 */ public void setSmtpServer(String smtpServer) { this.smtpServer = smtpServer; } /** * 设置发件人的地址 */ public void setFrom(String from) { this.from = from; }
(编辑:aniston)
·2024年12月目录 ·2024年11月目录 ·2024年10月目录 ·2024年9月目录 ·2024年8月目录 ·2024年7月目录 ·2024年6月目录 ·2024年5月目录 ·2024年4月目录 ·2024年3月目录 ·2024年2月目录 ·2024年1月目录 ·2023年12月目录 ·2023年11月目录