类 SmtpCfgs
java.lang.Object
com.gdxsoft.easyweb.utils.Mail.SmtpCfgs
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static javax.mail.SessioncreateMailSession(SmtpCfg smtpCfg) Create a mail sessionstatic javax.mail.SessioncreateMailSession(String host, String user, String password, int port, boolean ssl, boolean startTls) Create a mail sessionstatic SmtpCfgstatic DKIMCfgReturn the DKIMCfg according to parameter emailOrDomainstatic SmtpCfggetSmtpCfg(SendMail sm) Get a SMTP configuration from the SendMailstatic SmtpCfggetSmtpCfg(String fromEmail, List<Addr> recipients) Get a SMTP configuration from sender or recipientsstatic SmtpCfggetSmtpCfg(javax.mail.internet.MimeMessage msg) Get a SMTP configuration from the messagegetSmtpCfgByFromDomain(String fromDomain) Get all configurations that match the from domain namegetSmtpCfgByFromEmail(String fromEmail) Get all configuration that match the from email addressgetSmtpCfgByToDomain(String toDomain) Get all configurations that match the to domaingetSmtpCfgByToDomain(List<Addr> al) Get all SMTP configurations that match the recipient domain listgetSmtpCfgByToEmail(String toEmail) Get all configurations that match the to email addressgetSmtpCfgByToEmail(List<Addr> al) Get all SMTP configurations that match the recipient liststatic voidInitial smtp cfg
-
构造器详细资料
-
SmtpCfgs
public SmtpCfgs()
-
-
方法详细资料
-
initCfgs
Initial smtp cfg- 参数:
doc-
-
getDkim
Return the DKIMCfg according to parameter emailOrDomain- 参数:
emailOrDomain- Email or Domain- 返回:
- DKIMCfg or null
-
getSmtpCfg
Get a SMTP configuration from the SendMail- 参数:
sm- the SendMail- 返回:
- the SMTP configuration
-
getSmtpCfg
Get a SMTP configuration from the message- 参数:
msg- the message- 返回:
- the SMTP configuration
-
getSmtpCfg
Get a SMTP configuration from sender or recipients- 参数:
fromEmail- the from addressrecipients- the recipients- 返回:
- the SMTP configuration
-
getSmtpCfgByToEmail
Get all SMTP configurations that match the recipient list- 参数:
al- the recipient list- 返回:
- the configurations
-
getSmtpCfgByToDomain
Get all SMTP configurations that match the recipient domain list- 参数:
al- the recipient domain list- 返回:
- the configurations
-
getDefaultSmtpCfg
-
getSmtpCfgByToEmail
Get all configurations that match the to email address- 参数:
toEmail- the to email address- 返回:
- the list
-
getSmtpCfgByToDomain
Get all configurations that match the to domain- 参数:
toDomain- the to domain name- 返回:
- the configuration list that match the to domain
-
getSmtpCfgByFromEmail
Get all configuration that match the from email address- 参数:
fromEmail- The from email address- 返回:
- the configuration list that match the from email address
-
getSmtpCfgByFromDomain
Get all configurations that match the from domain name- 参数:
fromDomain- the from domain name- 返回:
- the result
-
createMailSession
Create a mail session- 参数:
smtpCfg- The SMTP configuration- 返回:
- The mail session
-
createMailSession
public static javax.mail.Session createMailSession(String host, String user, String password, int port, boolean ssl, boolean startTls) Create a mail session- 参数:
host- The SMTP server host/IPuser- The SMTP server userpassword- The SMTP server passwordport- The SMTP server portssl- Whether to use SSL protocol to connect the serverstartTls- Whether to use startTls command to send the email- 返回:
- The mail session
-