Discussion:
Sending in bulk mode from draft folder
Jose M Vidal
2011-05-06 12:38:19 UTC
Permalink
Hi!
I use mutt+offlineimap+msmtp
I am in a long flight, reading and replying/sending new mails, which
are stored in the draft/ folder.
As soon as I get an internet connection, I need to send those e-mails,
but as far as I know, I need to:
1. Open mutt
2. m, enter [already into Draft folder]
3. Open first postponed message, which is opened inside Vim
4. :q, y
5. Goto 2

is there any way to send all the messages without the need to open
them one by one?
Thanks!
--
jm
Erik Christiansen
2011-05-06 12:59:58 UTC
Permalink
Post by Jose M Vidal
is there any way to send all the messages without the need to open
them one by one?
Running an MTA, such as sendmail or postfix, would spool the
mails for you, automatically sending them when the connection is up.
(Your laptop would then behave like a part of the internet. ;-)

If that didn't suit, then a little bit of shell script could detect when
the link is up, then run a mail folder through a few lines of awk,
feeding to "mail" (or mutt) to shoot them out.

There doesn't seem to be any mention of "spool" in the mutt manual,
except in reference to the incoming spoolfile.

Erik
--
"The difference between theory and practice is much smaller in theory
than in practice..."
Tim Gray
2011-05-06 13:14:44 UTC
Permalink
Post by Jose M Vidal
is there any way to send all the messages without the need to open
them one by one?
As someone else mentioned, running a local smtp server like postfix will
do this automatically.

I've been using putmail[1] instead. It's a lightweight smtp client like
msmtp is, but written in Python. It has a companion script which queues
things. I wrapped all of this with a simple shell script that checks my
network connection and dequeues mail when I'm up. Though the details
are unimportant, all sent mail is queued and automatically dequeued when
I am connected, so I never worry about losing a message. I also have
some logic in place so that I can go into 'offline' mode and queues
messages without sending them even if I am connected.

[1]: http://putmail.sourceforge.net/home.html
Toby Cubitt
2011-05-06 15:21:28 UTC
Permalink
Post by Jose M Vidal
Hi!
I use mutt+offlineimap+msmtp
I am in a long flight, reading and replying/sending new mails, which
are stored in the draft/ folder.
As soon as I get an internet connection, I need to send those e-mails,
1. Open mutt
2. m, enter [already into Draft folder]
3. Open first postponed message, which is opened inside Vim
4. :q, y
5. Goto 2
is there any way to send all the messages without the need to open
them one by one?
Since you're using msmtp, have you investigated the msmtpQ script that
comes bundled with it?

It queues outgoing mail when msmtp can't contact your stmp server, and
you can then configure to send the queued when you're back online. A
lightweight solution, and much simpler than running a full smtp server if
you don't otherwise need one.

HTH,

Toby
--
Dr T. S. Cubitt
Mathematics and Quantum Information group
Department of Mathematics
Complutense University
Madrid, Spain

email: ***@cantab.net
web: www.dr-qubit.org
Jose M Vidal
2011-05-06 17:15:44 UTC
Permalink
Post by Toby Cubitt
Since you're using msmtp, have you investigated the msmtpQ script that
comes bundled with it?
Just did it!
And works great, thank you very much (to all).
--
jm
Ђорђе Тодоровић
2011-05-07 20:11:18 UTC
Permalink
Post by Jose M Vidal
Hi!
I use mutt+offlineimap+msmtp
I am in a long flight, reading and replying/sending new mails, which
are stored in the draft/ folder.
As soon as I get an internet connection, I need to send those e-mails,
1. Open mutt
2. m, enter [already into Draft folder]
3. Open first postponed message, which is opened inside Vim
4. :q, y
5. Goto 2
is there any way to send all the messages without the need to open
them one by one?
Thanks!
--
jm
I found this scripts on github,they are used to queue mails and send them
all at a later point with msmtp.

From README:
These scripts may be useful for dialup connections: You can "send" all your
mails offline (they will be queued by msmtp-enqueue.sh) and really send them
all later when you are online (by running msmtp-runqueue.sh).

Here's the link:
https://github.com/redondos/mutt/blob/master/.mutt/scripts/msmtpqueue
--
. O . | Djordje Todorovic [aceofknaves at G_M_A_I_L .com] | O . O
. . O | GPG-Key: 2048R/1E133339 (http://pgp.mit.edu) | . O O
O O O | BFF2 1C7F A70D ECCD FA8F C946 DB32 B498 1E13 3339 | . O .
Continue reading on narkive:
Search results for 'Sending in bulk mode from draft folder' (Questions and Answers)
236
replies
Where do you suggest going to files your taxes?
started 2007-01-17 08:04:37 UTC
united states
Loading...