org.subethamail.smtp.helper.SimpleMessageListenerAdapter Java Examples
The following examples show how to use
org.subethamail.smtp.helper.SimpleMessageListenerAdapter.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AwsSmtpRelay.java From aws-smtp-relay with GNU Lesser General Public License v3.0 | 5 votes |
void run() throws UnknownHostException { String bindAddress = cmd.hasOption("b") ? cmd.getOptionValue("b") : "127.0.0.1"; SMTPServer smtpServer = new SMTPServer(new SimpleMessageListenerAdapter(this)); smtpServer.setBindAddress(InetAddress.getByName(bindAddress)); if (cmd.hasOption("p")) { smtpServer.setPort(Integer.parseInt(cmd.getOptionValue("p"))); } else { smtpServer.setPort(10025); } smtpServer.start(); }
Example #2
Source File: SmtpServerFactoryImpl.java From fake-smtp-server with Apache License 2.0 | 5 votes |
@Override public SmtpServer create() { var simpleMessageListenerAdapter = new SimpleMessageListenerAdapter(messageListener); var smtpServer = new SMTPServer(simpleMessageListenerAdapter); configurator.configure(smtpServer); return new SmtpServerImpl(smtpServer); }
Example #3
Source File: Wiser.java From subethasmtp with Apache License 2.0 | 2 votes |
/** * Create a new SMTP server with this class as the listener. * The default port is 25. Call setPort()/setHostname() before * calling start(). */ public Wiser() { this.server = new SMTPServer(new SimpleMessageListenerAdapter(this)); }