Re: How can I know if error happens when sending mail?
Hi All,
Eventually I solved it by a simple wrapper of msmtp. It looks like this:
---------code--------
lars:~$ less .bin/msmtp-wrap
#! /bin/bash
msmtp $*
if [ $? != 0 ]
then
gxmessage -wrap -fg red -bg black -default okay -center MSMTP: `tail -1
~/.getmail/msmtp.log`
fi
----------------------
and replace msmtp with msmtp-wrap in my .muttrc.
Now if there is anything wrong, a messagebox will show up to tell me.
It works fine now. If you have any improvement please share with us.
Regards
Lars
On Tue, 02 Jun 2009, JP Bruns wrote:
> Nicolas [02.Jun.2009 16:09]:
>
>> * JP Bruns <emailjp79@xxxxxx> [2009-06-02 10:37 +0200]:
>>> Is there anything for console-only systems? Mutt is a great piece of
>>> software, but - in my eyes - is lacking this important feature. Would it be
>>> possible to take the return-code/-message of the *smtp program and display
>>> that on the status-line (or the message(?)-line)? What about creating a
>>> mail-reply to that message on its own with the sending-error as body and
>>> mark that as new mail?
>>
>> Please wrap your lines.
>
> Oh, I am sorry, I forgot to change it back after sending some
> config-files some time ago. Mutt was still wrapping it for me, so I
> didn't think about it :( My bad.
>
>> The manual says about sendmail_wait:
>> Note that if you specify a value other than 0, the output of the child
>> process will be put in a temporary file. If there is some error, you
>> will be informed as to where to find the output.
>
> That is strange because I have it set to -1 and do not see any message
> as to where the output is. Might it be that this messages is only shown
> for a short time or that it will be "clicked" away while I continue using
> mutt? I will try changing it to a positive value, waiting one second is
> still acceptable compared to the time a 3MB email takes.
>
>
> JP