本文整理汇总了Java中org.subethamail.smtp.server.SMTPServer.setHostName方法的典型用法代码示例。如果您正苦于以下问题:Java SMTPServer.setHostName方法的具体用法?Java SMTPServer.setHostName怎么用?Java SMTPServer.setHostName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.subethamail.smtp.server.SMTPServer
的用法示例。
在下文中一共展示了SMTPServer.setHostName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startup
import org.subethamail.smtp.server.SMTPServer; //导入方法依赖的package包/类
@Override
public void startup()
{
serverImpl = new SMTPServer(new HandlerFactory());
// MER - May need to override SMTPServer.createSSLSocket to specify non default keystore.
serverImpl.setPort(getPort());
serverImpl.setHostName(getDomain());
serverImpl.setMaxConnections(getMaxConnections());
serverImpl.setHideTLS(isHideTLS());
serverImpl.setEnableTLS(isEnableTLS());
serverImpl.setRequireTLS(isRequireTLS());
if(isAuthenticate())
{
AuthenticationHandlerFactory authenticationHandler = new EasyAuthenticationHandlerFactory(new AlfrescoLoginUsernamePasswordValidator());
serverImpl.setAuthenticationHandlerFactory(authenticationHandler);
}
serverImpl.start();
log.info("Inbound SMTP Email Server has started successfully, on hostName:" + getDomain() + "port:" + getPort());
}
示例2: init
import org.subethamail.smtp.server.SMTPServer; //导入方法依赖的package包/类
public void init() {
Objects.requireNonNull(rb, "ResourceLoader must be set");
Objects.requireNonNull(serverConfigurationService, "ServerConfigurationService must be set");
Objects.requireNonNull(entityManager, "EntityManager must be set");
Objects.requireNonNull(aliasService, "AliasService must be set");
Objects.requireNonNull(userDirectoryService, "UserDirectoryService must be set");
Objects.requireNonNull(siteService, "SiteService must be set");
Objects.requireNonNull(timeService, "TimeService must be set");
Objects.requireNonNull(threadLocalManager, "ThreadLocalManager must be set");
Objects.requireNonNull(contentHostingService, "ContentHostingService must be set");
Objects.requireNonNull(mailArchiveService, "MailArchiveService must be set");
Objects.requireNonNull(sessionManager, "SessionManager must be set");
if (serverConfigurationService.getBoolean("smtp.enabled", false)) {
server = new SMTPServer(this);
server.setHostName(serverConfigurationService.getServerName());
server.setPort(serverConfigurationService.getInt("smtp.port", 25));
server.setSoftwareName("SubEthaSMTP - Sakai (" + serverConfigurationService.getString("sakai.version", "unknown") +
")");
// We don't support smtp.dns.1 and smtp.dns.2
server.setMaxConnections(100);
server.start();
}
}
示例3: start
import org.subethamail.smtp.server.SMTPServer; //导入方法依赖的package包/类
@PostConstruct
public void start() {
smtpServer = new SMTPServer(myMessageHandlerFactory);
smtpServer.setPort(port);
smtpServer.setHostName(hostName);
smtpServer.start();
log.info("****** SMTP Server is running for domain " + smtpServer.getHostName()
+ " on port " + smtpServer.getPort());
}