/** * Empty constructor, required for configuration.<p> */ public CmsMailSettings() { m_mailFromDefault = MAIL_DEFAULT_SENDER; m_mailHosts = new ArrayList(); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_EMPTY_CONSTRUCTOR_CALLED_1)); } }
/** * Empty constructor, required for configuration.<p> */ public CmsMailSettings() { m_mailFromDefault = MAIL_DEFAULT_SENDER; m_mailHosts = new ArrayList<CmsMailHost>(); if (LOG.isDebugEnabled()) { LOG.debug(Messages.get().getBundle().key(Messages.LOG_EMPTY_CONSTRUCTOR_CALLED_1)); } }
/** * Sets the mail from default sender.<p> * * @param sender the mail from default sender to set */ public void setMailFromDefault(String sender) { m_mailFromDefault = sender; if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.LOG_DEFAULT_SENDER_1, m_mailFromDefault)); } }
/** * Sets the mail from default sender.<p> * * @param sender the mail from default sender to set */ public void setMailFromDefault(String sender) { m_mailFromDefault = sender; if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.LOG_DEFAULT_SENDER_1, m_mailFromDefault)); } }
/** * @see java.lang.Thread#run() */ @Override public void run() { try { m_email.send(); } catch (EmailException e) { if (LOG.isErrorEnabled()) { LOG.error(Messages.get().getBundle().key(Messages.LOG_SEND_MAIL_ERR_0), e); } } }
/** * @see java.lang.Thread#run() */ @Override public void run() { try { m_email.send(); } catch (EmailException e) { if (LOG.isErrorEnabled()) { LOG.error(Messages.get().getBundle().key(Messages.LOG_SEND_MAIL_ERR_0), e); } } }
m_mailHosts.add(host); if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.LOG_ADD_HOST_1, host));
m_mailHosts.add(host); if (CmsLog.INIT.isInfoEnabled()) { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.LOG_ADD_HOST_1, host));
email.setSubject(m_subject); } catch (EmailException e) { LOG.error(Messages.get().getBundle().key(Messages.LOG_COMPOSE_MAIL_ERR_0), e);
email.setSubject(m_subject); } catch (EmailException e) { LOG.error(Messages.get().getBundle().key(Messages.LOG_COMPOSE_MAIL_ERR_0), e);
} catch (EmailException e) { LOG.error(Messages.get().getBundle().key(Messages.LOG_INVALID_SENDER_ADDRESS_0), e);
/** * Default constructor of a CmsHtmlMail.<p> * * The mail host name and the mail from address are set to the OpenCms * default values of the configuration.<p> * */ public CmsHtmlMail() { // call super constructor super(); // set the host to the default mail host CmsMailHost host = OpenCms.getSystemInfo().getMailSettings().getDefaultMailHost(); setHostName(host.getHostname()); this.setSmtpPort(host.getPort()); // check if username and password are provided String userName = host.getUsername(); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(userName)) { // authentication needed, set user name and password setAuthentication(userName, host.getPassword()); } try { // set default mail from address setFrom(OpenCms.getSystemInfo().getMailSettings().getMailFromDefault()); } catch (EmailException e) { // default email address is not valid, log error LOG.error(Messages.get().getBundle().key(Messages.LOG_INVALID_SENDER_ADDRESS_0), e); } }
/** * Default constructor of a CmsHtmlMail.<p> * * The mail host name and the mail from address are set to the OpenCms * default values of the configuration.<p> * */ public CmsMultiPartMail() { // call super constructor super(); // set the host to the default mail host CmsMailHost host = OpenCms.getSystemInfo().getMailSettings().getDefaultMailHost(); setHostName(host.getHostname()); setSmtpPort(host.getPort()); // check if username and password are provided String userName = host.getUsername(); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(userName)) { // authentication needed, set user name and password setAuthentication(userName, host.getPassword()); } try { // set default mail from address setFrom(OpenCms.getSystemInfo().getMailSettings().getMailFromDefault()); } catch (EmailException e) { // default email address is not valid, log error LOG.error(Messages.get().getBundle().key(Messages.LOG_INVALID_SENDER_ADDRESS_0), e); } }
/** * Default constructor of a CmsSimpleMail.<p> * * The mail host name and the mail from address are set to the OpenCms * default values of the configuration.<p> * */ public CmsSimpleMail() { // call super constructor super(); // set the host to the default mail host CmsMailHost host = OpenCms.getSystemInfo().getMailSettings().getDefaultMailHost(); setHostName(host.getHostname()); this.setSmtpPort(host.getPort()); // check if username and password are provided String userName = host.getUsername(); if (CmsStringUtil.isNotEmptyOrWhitespaceOnly(userName)) { // authentication needed, set user name and password setAuthentication(userName, host.getPassword()); } try { // set default mail from address setFrom(OpenCms.getSystemInfo().getMailSettings().getMailFromDefault()); } catch (EmailException e) { // default email address is not valid, log error LOG.error(Messages.get().getBundle().key(Messages.LOG_INVALID_SENDER_ADDRESS_0), e); } }
org.opencms.loader.Messages.get(), org.opencms.lock.Messages.get(), org.opencms.mail.Messages.get(), org.opencms.main.Messages.get(), org.opencms.module.Messages.get(),
org.opencms.loader.Messages.get(), org.opencms.lock.Messages.get(), org.opencms.mail.Messages.get(), org.opencms.main.Messages.get(), org.opencms.module.Messages.get(),