Hi I am not sure what the full problem is (I will try and have a better look later), but I think the main problem is that the sending mail part is returning an error. The "Sending...failed to" is coming from emacs, and I think the "mail for [ -oi -t > ] : send was successful; " from msmtp/msmptq. The insert is done after the send, so since this returns an error the insert is never attempted. Best wishes Mark