If mail sending from emacs fails before it has chance to connect
to the smtp-dummy mail server, the opportunistic QUIT message
sending makes smtp-dummy to exit.
(insert \"${body}\")
$@
(message-send-and-exit))"
(insert \"${body}\")
$@
(message-send-and-exit))"
+ # opportunistically quit smtp-dummy in case above fails.
+ { echo QUIT > /dev/tcp/localhost/25025; } 2>/dev/null
wait ${smtp_dummy_pid}
notmuch new >/dev/null
}
wait ${smtp_dummy_pid}
notmuch new >/dev/null
}