High performance Mail Transfer Agent (MTA) | MailerQ Installation guide Features Pricing Documentation Blog Jobs Login Function MQ_continue MailerQ has a non-blocking nature, and uses callbacks to pass control to a plugin. It is then up to the plugin to interact with the event loop, and pass control back to MailerQ when it is ready with its task. Passing back control can be done in three different ways: Tell MailerQ to run the next plugin (the normal way of returning control) Tell MailerQ to skip all other plugins Tell MailerQ to call the first plugin again The MQ_continue() function can be used for the first of the above options to hand control back to MailerQ. If you call MQ_continue(), MailerQ will call the next plugin in line, or continues with its original algorithm if no other plugins are available. /**  *  Finish plugin processing  *  *  @param  connection  the connection that may move on to the next plugin  */ void MQ_continue(MQ_Connection *connection); See also MQ_complete() and MQ_retry() for the other ways of handing back control. Function mq_smtp_out_data() If your plugin contains this function, it will be called as soon as the SMTP connection enters the data state, giving you the chance to manipulate the message body before it is sent. Normally, the full MIME messages that are going to be sent by MailerQ are stored in the JSON objects that are loaded from RabbitMQ. When a SMTP connection has been set up, the MIME is extracted from the JSON and sent over the SMTP connection. But you may write a plugin that does this in a different way. If you want to write a plugin to generate the MIME in a different fashion, you can do so by implementing the mq_smtp_out_data() function. This function is called by MailerQ after the SMTP connection has been set up, to load the actual MIME message. This method is designed to run asynchronously. You should not execute any blocking calls from within this function, if you do you will disturb other active connections resulting in timeouts. #include <mailerq.h>