smtpServer.setConnectionTimeout(context.getProperty(SMTP_TIMEOUT).asTimePeriod(TimeUnit.MILLISECONDS).intValue()); if (context.getProperty(SMTP_HOSTNAME).isSet()) { smtpServer.setHostName(context.getProperty(SMTP_HOSTNAME).getValue());
/** * The hostname that the server should listen on. * @param hostname */ public void setHostname(String hostname) { this.server.setHostName(hostname); }
/** * The hostname that the server should listen on. * @param hostname */ public void setHostname(String hostname) { this.server.setHostName(hostname); }
/** * The hostname that the server should listen on. * @param hostname */ public void setHostname(String hostname) { this.server.setHostName(hostname); }
/** * The hostname that the server should listen on. */ public void setHostname(String hostname) { this.server.setHostName(hostname); }
public void doTest() throws Exception { Wiser wiser = new Wiser(); SMTPServer smtpServer = createServer(new SimpleMessageListenerAdapter(wiser)); smtpServer.setHostName("localhost"); smtpServer.setPort(5000); TestPluginLifeCycle lifeCycle = createLifeCycle(); try { lifeCycle.start(); smtpServer.start(); execute(lifeCycle, wiser); } finally { smtpServer.stop(); lifeCycle.stop(); } } }
@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()); }
@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()); }
smtpServer.setConnectionTimeout(context.getProperty(SMTP_TIMEOUT).asTimePeriod(TimeUnit.MILLISECONDS).intValue()); if (context.getProperty(SMTP_HOSTNAME).isSet()) { smtpServer.setHostName(context.getProperty(SMTP_HOSTNAME).getValue());