地质所 沉降监测网建设项目
zmk
2024-10-23 3f47c88e7cb4e53b3637620794420181f47b5a5e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
package com.javaweb.cms.util.email;
 
import java.util.Properties;
 
public class MailSenderInfo {
    //邮件服务器地址
    private String mailServiceHost;
    //邮件服务器端口号
    private String mailServicePort;
     // 是否需要身份验证    
    private boolean validate = true;    
    
    public boolean isValidate() {
        return validate;
    }
    public void setValidate(boolean validate) {
        this.validate = validate;
    }
    //发件人
    private String fromAddress;
    //收件人可以多个
    private String[] toAddress;
    //附件可以多个
    private String[] attachs=null;
    //主题
    private String subject;
    //用户名
    private String userName;
    //密码
    private String password;
    //内容
    private String content;
    
     /**   
     * 获得邮件会话属性   
     */    
   public Properties getProperties(){    
     Properties p = new Properties();    
     p.put("mail.smtp.host", this.mailServiceHost);    
     p.put("mail.smtp.port", this.mailServicePort);    
     p.put("mail.smtp.auth", validate ? "true" : "false");    
     return p;    
   }    
    public String getMailServiceHost() {
        return mailServiceHost;
    }
    public void setMailServiceHost(String mailServiceHost) {
        this.mailServiceHost = mailServiceHost;
    }
    public String getMailServicePort() {
        return mailServicePort;
    }
    public void setMailServicePort(String mailServicePort) {
        this.mailServicePort = mailServicePort;
    }
    public String getFromAddress() {
        return fromAddress;
    }
    public void setFromAddress(String fromAddress) {
        this.fromAddress = fromAddress;
    }
 
    public String[] getToAddress() {
        return toAddress;
    }
    public void setToAddress(String[] toAddress) {
        this.toAddress = toAddress;
    }
    public String getSubject() {
        return subject;
    }
    public void setSubject(String subject) {
        this.subject = subject;
    }
    public String getUserName() {
        return userName;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }
    public String getPassword() {
        return password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
    public String[] getAttachs() {
        return attachs;
    }
    public void setAttachs(String[] attachs) {
        this.attachs = attachs;
    }
    
}