类 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
-
getDkim
-
getSmtpCfg
-
getSmtpCfg
Get a SMTP configuration from the message- 参数:
msg- the message- 返回:
- the SMTP configuration
-
getSmtpCfg
-
getSmtpCfgByToEmail
-
getSmtpCfgByToDomain
-
getDefaultSmtpCfg
-
getSmtpCfgByToEmail
-
getSmtpCfgByToDomain
-
getSmtpCfgByFromEmail
-
getSmtpCfgByFromDomain
-
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
-