package async_smtp

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

It is common for some external content scanning software to accept messages over smtp, scan them, then return them back over smtp with some added headers. This module coordinates this exchange by starting an smtp server to accept the returned message. The server that is sent to (using send_receive) must be configured to send responses to the correct address (as specified by start_exn).

type t

start an smtp server that will be accepting messages back

send_receive ?timeout addr message will attempt to send message to addr. It waits up to timeout for a response message. addr must send a response that has the same headers as message so it can recognized as a response.