类 EmailComponent

java.lang.Object
com.publiccms.logic.component.site.EmailComponent
所有已实现的接口:
Cache, Config, SiteCache

@Component public class EmailComponent extends Object implements SiteCache, Config
MailComponent 邮件发送组件
  • 字段详细资料

  • 构造器详细资料

    • 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

      public String getCode(short siteId, boolean showAll)
      指定者:
      getCode 在接口中 Config
      参数:
      siteId -
      showAll -
      返回:
      config code or null
    • getCodeDescription

      public String getCodeDescription(Locale locale)
      指定者:
      getCodeDescription 在接口中 Config
      参数:
      locale -
      返回:
    • getExtendFieldList

      public List<SysExtendField> getExtendFieldList(SysSite site, Locale locale)
      指定者:
      getExtendFieldList 在接口中 Config
      参数:
      site -
      locale -
      返回:
      config extend field list
    • clear

      public void clear(short siteId)
      指定者:
      clear 在接口中 SiteCache
      参数:
      siteId -
    • clear

      public void clear()
      指定者:
      clear 在接口中 Cache
    • initCache

      public void initCache(CacheEntityFactory cacheEntityFactory) throws ClassNotFoundException, InstantiationException, IllegalAccessException
      参数:
      cacheEntityFactory -
      抛出:
      IllegalAccessException
      InstantiationException
      ClassNotFoundException
    • destroy

      @PreDestroy public void destroy()