Re: Sending in bulk mode from draft folder

2011-05-07 Thread Ђорђе Тодоровић

On Fri, 06 May 2011, Jose M Vidal wrote:


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


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/1E19(http://pgp.mit.edu)   | . O O
 O O O | BFF2 1C7F A70D ECCD FA8F C946 DB32 B498 1E13 3339 | . O .


Re: Sending in bulk mode from draft folder

2011-05-06 Thread Erik Christiansen
On Fri, May 06, 2011 at 02:38:19PM +0200, Jose M Vidal wrote:
 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...



Re: Sending in bulk mode from draft folder

2011-05-06 Thread Tim Gray

On May 06, 2011 at 02:38 PM +0200, Jose M Vidal wrote:

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


Re: Sending in bulk mode from draft folder

2011-05-06 Thread Toby Cubitt
On Fri, May 06, 2011 at 02:38:19PM +0200, Jose M Vidal wrote:
 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?

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: ts...@cantab.net
web:   www.dr-qubit.org


Re: Sending in bulk mode from draft folder

2011-05-06 Thread Jose M Vidal
 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