anchor.diff:  % Timeout value for the connection of the spamassassin daemon
   -define(SPAMD_TIMEOUT, 10000).
   
  +% Max number of e-mails being sent at the same time
  +-define(EMAIL_MAX_SENDING, 30).
  +
  +
   -record(state, {smtp_relay, smtp_relay_opts, smtp_no_mx_lookups,
                   smtp_verp_as_from, smtp_bcc, override, 
                   smtp_spamd_ip, smtp_spamd_port, sending=[],
                   delete_sent_after}).
  --record(email_queue, {id, retry_on=inc_timestamp(now(), 10), retry=0, 
  +-record(email_queue, {id, retry_on=inc_timestamp(now(), 1), retry=0, 
                         recipient, email, created=now(), sent, 
                         pickled_context}).
   
  
positive.code:                                             }}, Context),
                      %% delete email from the queue and notify the system
                      delete_emailq(Id),
                      z_notifier:first({email_failed, Id, Recipient}, Context),
                      io:format("Invalid SMTP options: ~p\n", [Reason]);
                  Receipt when is_binary(Receipt) ->
                      z_notifier:notify({log, LogEmail#log_email{
                                                  severity=?LOG_INFO, 
  
negative.code: poll_queued(State) ->
  
      %% delete sent messages
      Now = now(),
      DelTransFun = fun() -> 
                            DelQuery = qlc:q([QEmail || QEmail <- mnesia:table(email_queue),
                                                        QEmail#email_queue.sent /= undefined andalso
                                                          timer:now_diff(
                                                              inc_timestamp(QEmail#email_queue.sent, State#state.delete_sent_after),
                                                              Now) < 0
                                              ]),
                            DelQueryRes = qlc:e(DelQuery),
                            [ begin
  