001package com.java.mail;
002import java.util.Properties;
003 
004     
005 
006    public class MailInfo {
007        private String mailServerHost;
008        private String mailServerPort;
009        private String fromAddress;
010        private String toAddress;
011        private String username;
012        private String password;
013        private boolean validate = false;
014        private String subject;
015        private String content;
016        private String[] attachFileNames;
017         
018        public Properties getProperties() {
019            Properties p = new Properties();
020            p.put("mail.smtp.host", this.mailServerHost);
021            p.put("mail.smtp.port", this.mailServerPort);
022            p.put("mail.smtp.auth", validate ? "true" : "false");
023            return p;
024        }
025 
026        public String getMailServerHost() {
027            return mailServerHost;
028        }
029 
030        public void setMailServerHost(String mailServerHost) {
031            this.mailServerHost = mailServerHost;
032        }
033 
034        public String getMailServerPort() {
035            return mailServerPort;
036        }
037 
038        public void setMailServerPort(String mailServerPort) {
039            this.mailServerPort = mailServerPort;
040        }
041 
042        public String getFromAddress() {
043            return fromAddress;
044        }
045 
046        public void setFromAddress(String fromAddress) {
047            this.fromAddress = fromAddress;
048        }
049 
050        public String getToAddress() {
051            return toAddress;
052        }
053 
054        public void setToAddress(String toAddress) {
055            this.toAddress = toAddress;
056        }
057 
058        public String getUsername() {
059            return username;
060        }
061 
062        public void setUsername(String username) {
063            this.username = username;
064        }
065 
066        public String getPassword() {
067            return password;
068        }
069 
070        public void setPassword(String password) {
071            this.password = password;
072        }
073 
074        public boolean isValidate() {
075            return validate;
076        }
077 
078        public void setValidate(boolean validate) {
079            this.validate = validate;
080        }
081 
082        public String getSubject() {
083            return subject;
084        }
085 
086        public void setSubject(String subject) {
087            this.subject = subject;
088        }
089 
090        public String getContent() {
091            return content;
092        }
093 
094        public void setContent(String content) {
095            this.content = content;
096        }
097 
098        public String[] getAttachFileNames() {
099            return attachFileNames;
100        }
101 
102        public void setAttachFileNames(String[] attachFileNames) {
103            this.attachFileNames = attachFileNames;
104        }
105 
106}
最近下载更多
1358849392  LV21 2022年12月27日
moomin709  LV24 2022年7月6日
瓜不皮  LV15 2020年12月9日
kayok  LV19 2019年4月17日
2469684164  LV10 2019年3月16日
落雪飞花  LV6 2018年12月7日
Joyyoe  LV4 2018年10月9日
nanjing2017  LV15 2017年9月8日
hkp0521  LV7 2017年8月23日
cas  LV9 2017年5月27日
最近浏览更多
annazhang  LV29 2023年4月7日
Tuxxxxx  LV3 2023年1月3日
1358849392  LV21 2022年12月27日
不想起  LV10 2022年10月15日
moomin709  LV24 2022年7月6日
Rommel  LV27 2022年5月11日
伊不归  LV6 2022年4月20日
WDgxl2  LV2 2022年2月10日
山鬼非鬼  LV1 2021年9月29日
zhaojialiang  LV7 2021年5月14日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友