Next: Server workarounds, Previous: Authentication, Up: Top

## 4 Queued delivery

If you connect to the internet via a dialup connection, or for some other reason don't have permanent internet connection, sending mail will fail when you are not connected. The SMTP library implements queued delivery, and the following variable control its behavior.

`smtpmail-queue-mail`
  The variable `smtpmail-queue-mail` controls whether a simple off line mail sender is active. This variable is a boolean, and defaults to `nil` (disabled). If this is non-`nil`, mail is not sent immediately but rather queued in the directory `smtpmail-queue-dir` and can be later sent manually by invoking `smtpmail-send-queued-mail` (typically when you connect to the internet).
`smtpmail-queue-dir`
  The variable `smtpmail-queue-dir` specifies the name of the directory to hold queued messages. It defaults to `~/Mail/queued-mail/`.

The function `smtpmail-send-queued-mail` can be used to send any queued mail when `smtpmail-queue-mail` is enabled. It is typically invoked interactively with `M-x smtpmail-send-queued-mail RET` when you are connected to the internet.