类 EmailComponent
java.lang.Object
com.publiccms.logic.component.site.EmailComponent
MailComponent 邮件发送组件
-
字段概要
字段修饰符和类型字段说明private CacheEntity<Short,
org.springframework.mail.javamail.JavaMailSenderImpl> static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected ConfigDataComponent
private final org.apache.commons.logging.Log
private static ExecutorService
从接口继承的字段 com.publiccms.common.api.Config
CONFIG_CODE_DESCRIPTION_SUFFIX, CONFIGPREFIX, INPUT_TYPE_EDITORS, INPUT_TYPE_FILES, INPUT_TYPE_PRIVATE_FILES, INPUTTYPE_BOOLEAN, INPUTTYPE_CAPTCHA, INPUTTYPE_CATEGORY, INPUTTYPE_CATEGORY_PATH, INPUTTYPE_CATEGORYTYPE, INPUTTYPE_COLOR, INPUTTYPE_CONTENT, INPUTTYPE_CONTENT_STATUS, INPUTTYPE_DATE, INPUTTYPE_DATETIME, INPUTTYPE_DEPT, INPUTTYPE_DICTIONARY, INPUTTYPE_EMAIL, INPUTTYPE_FILE, INPUTTYPE_FONT, INPUTTYPE_IMAGE, INPUTTYPE_KEYVALUE, INPUTTYPE_KEYWORDS, INPUTTYPE_LANG, INPUTTYPE_MODULE, INPUTTYPE_NUMBER, INPUTTYPE_PASSWORD, INPUTTYPE_POSITION, INPUTTYPE_PRIVATEFILE, INPUTTYPE_PRIVATEIMAGE, INPUTTYPE_PRIVATEVIDEO, INPUTTYPE_SENSITIVEWORDS, INPUTTYPE_SURVEY, INPUTTYPE_TAG, INPUTTYPE_TAGTYPE, INPUTTYPE_TEMPLATE, INPUTTYPE_TEXT, INPUTTYPE_TEXTAREA, INPUTTYPE_TIME, INPUTTYPE_USER, INPUTTYPE_VIDEO, INPUTTYPE_VOTE
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
clear()
void
clear
(short siteId) void
destroy()
getCode
(short siteId, boolean showAll) getCodeDescription
(Locale locale) getExtendFieldList
(SysSite site, Locale locale) org.springframework.mail.javamail.JavaMailSender
getMailSender
(short siteId, Map<String, String> config) void
initCache
(CacheEntityFactory cacheEntityFactory) boolean
private boolean
send
(short siteId, String[] toAddress, String[] cc, String[] bcc, String title, String content, boolean isHtml, String[] fileNames, File[] files) boolean
send
(short siteId, String[] toAddress, String[] cc, String[] bcc, String title, String content, String[] fileNames, File[] files) boolean
boolean
boolean
sendHtml
(short siteId, String[] toAddress, String[] cc, String[] bcc, String title, String html, String[] fileNames, File[] files) boolean
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 com.publiccms.common.api.Config
exportable, getCode, getMessage
-
字段详细资料
-
CONFIG_CODE
- 另请参阅:
-
CONFIG_DEFAULTENCODING
- 另请参阅:
-
CONFIG_HOST
- 另请参阅:
-
CONFIG_PORT
- 另请参阅:
-
CONFIG_USERNAME
- 另请参阅:
-
CONFIG_PASSWORD
- 另请参阅:
-
CONFIG_TIMEOUT
- 另请参阅:
-
CONFIG_AUTH
- 另请参阅:
-
CONFIG_SSL
- 另请参阅:
-
CONFIG_FROMADDRESS
- 另请参阅:
-
CONFIG_PERSONAL
- 另请参阅:
-
CONFIG_CODE_DESCRIPTION
-
log
private final org.apache.commons.logging.Log log -
configDataComponent
-
cache
-
pool
-
-
构造器详细资料
-
EmailComponent
public EmailComponent()
-
-
方法详细资料
-
getMailSender
public org.springframework.mail.javamail.JavaMailSender getMailSender(short siteId, Map<String, String> config) - 参数:
siteId
-config
-- 返回:
- mail sender
-
send
public boolean send(short siteId, String toAddress, String title, String content) throws jakarta.mail.MessagingException - 参数:
siteId
-toAddress
-title
-content
-- 返回:
- whether to send successfully
- 抛出:
jakarta.mail.MessagingException
-
send
public boolean send(short siteId, String[] toAddress, String[] cc, String[] bcc, String title, String content) throws jakarta.mail.MessagingException - 参数:
siteId
-toAddress
-cc
-bcc
-title
-content
-- 返回:
- whether to send successfully
- 抛出:
jakarta.mail.MessagingException
-
send
public boolean send(short siteId, String[] toAddress, String[] cc, String[] bcc, String title, String content, String[] fileNames, File[] files) throws jakarta.mail.MessagingException - 参数:
siteId
-toAddress
-cc
-bcc
-title
-content
-fileNames
-files
-- 返回:
- whether to send successfully
- 抛出:
jakarta.mail.MessagingException
-
sendHtml
public boolean sendHtml(short siteId, String toAddress, String title, String html) throws jakarta.mail.MessagingException - 参数:
siteId
-toAddress
-title
-html
-- 返回:
- whether to send successfully
- 抛出:
jakarta.mail.MessagingException
-
sendHtml
public boolean sendHtml(short siteId, String[] toAddress, String[] cc, String[] bcc, String title, String html) throws jakarta.mail.MessagingException - 参数:
siteId
-toAddress
-cc
-bcc
-title
-html
-- 返回:
- whether to send successfully
- 抛出:
jakarta.mail.MessagingException
-
sendHtml
public boolean sendHtml(short siteId, String[] toAddress, String[] cc, String[] bcc, String title, String html, String[] fileNames, File[] files) throws jakarta.mail.MessagingException - 参数:
siteId
-toAddress
-cc
-bcc
-title
-html
-fileNames
-files
-- 返回:
- whether to send successfully
- 抛出:
jakarta.mail.MessagingException
-
send
private boolean send(short siteId, String[] toAddress, String[] cc, String[] bcc, String title, String content, boolean isHtml, String[] fileNames, File[] files) throws jakarta.mail.MessagingException - 抛出:
jakarta.mail.MessagingException
-
getCode
-
getCodeDescription
- 指定者:
getCodeDescription
在接口中Config
- 参数:
locale
-- 返回:
-
getExtendFieldList
- 指定者:
getExtendFieldList
在接口中Config
- 参数:
site
-locale
-- 返回:
- config extend field list
-
clear
public void clear(short siteId) -
clear
public void clear() -
initCache
public void initCache(CacheEntityFactory cacheEntityFactory) throws ClassNotFoundException, InstantiationException, IllegalAccessException - 参数:
cacheEntityFactory
-- 抛出:
IllegalAccessException
InstantiationException
ClassNotFoundException
-
destroy
@PreDestroy public void destroy()
-