Hi, I'm trying to make sending mail over SMTP asynchronous. For this, I'm working on 'smtpmail-send-it'… but I think that that function does too much and is hard to reason about. This patch just splits 'smtpmail-send-it' work into three functions: prepare a mail and queue it or send it. There should be no change in functionality (it is mostly code refactoring). I've tested it a bit with sending and queueing and this seems to work correctly but this needs way more eyes and tests. BTW, does anyone know the purpose of 'errbuf': I see it is created then erased and then killed?