implemented smtp-writer for imap