/** 取得指定名称的mail store。 */ public MailStore getMailStore(String id, Properties overrideProps) throws MailStoreNotFoundException { id = assertNotNull(trimToNull(id), "no mailStore id"); MailStore store = mailStores.get(id); if (store == null) { throw new MailStoreNotFoundException("Could not find mail store: " + id); } // 返回复本 return new MailStore(store, overrideProps); }
/** 取得指定名称的mail store。 */ public MailStore getMailStore(String id, Properties overrideProps) throws MailStoreNotFoundException { id = assertNotNull(trimToNull(id), "no mailStore id"); MailStore store = mailStores.get(id); if (store == null) { throw new MailStoreNotFoundException("Could not find mail store: " + id); } // 返回复本 return new MailStore(store, overrideProps); }
/** 有一些服务器要求在连smtp之前,到pop3服务器上去验证。 */ private void connectPopBeforeSmtp() throws MailException { if (popBeforeSmtpId != null) { MailService service = getMailService(); if (service == null) { throw new MailStoreNotFoundException("Could not find mail store \"" + popBeforeSmtpId + "\": mail service is not set"); } MailStore popBeforeSmtpStore = assertNotNull(service.getMailStore(popBeforeSmtpId), "popBeforeSmtpStore: %s", popBeforeSmtpId); try { popBeforeSmtpStore.connect(); } finally { popBeforeSmtpStore.close(); } } }
/** 有一些服务器要求在连smtp之前,到pop3服务器上去验证。 */ private void connectPopBeforeSmtp() throws MailException { if (popBeforeSmtpId != null) { MailService service = getMailService(); if (service == null) { throw new MailStoreNotFoundException("Could not find mail store \"" + popBeforeSmtpId + "\": mail service is not set"); } MailStore popBeforeSmtpStore = assertNotNull(service.getMailStore(popBeforeSmtpId), "popBeforeSmtpStore: %s", popBeforeSmtpId); try { popBeforeSmtpStore.connect(); } finally { popBeforeSmtpStore.close(); } } }
/** 取得指定名称的mail store。 */ public MailStore getMailStore(String id, Properties overrideProps) throws MailStoreNotFoundException { id = assertNotNull(trimToNull(id), "no mailStore id"); MailStore store = mailStores.get(id); if (store == null) { throw new MailStoreNotFoundException("Could not find mail store: " + id); } // 返回复本 return new MailStore(store, overrideProps); }
/** 有一些服务器要求在连smtp之前,到pop3服务器上去验证。 */ private void connectPopBeforeSmtp() throws MailException { if (popBeforeSmtpId != null) { MailService service = getMailService(); if (service == null) { throw new MailStoreNotFoundException("Could not find mail store \"" + popBeforeSmtpId + "\": mail service is not set"); } MailStore popBeforeSmtpStore = assertNotNull(service.getMailStore(popBeforeSmtpId), "popBeforeSmtpStore: %s", popBeforeSmtpId); try { popBeforeSmtpStore.connect(); } finally { popBeforeSmtpStore.close(); } } }