                     (nnir-notmuch-remove-prefix ,(expand-file-name "~/Mail/archive/"))))
 
        ;; automatically add accounts when address is not nil and not the empty string
+       ;; XXX: this should be abstracted away in some kind of function
        (remove-if #'null
                   (mapcar (lambda (account)
                             (let ((account-name (nth 1 account))

    (if account
        (progn
          (message "Sending with account for %s" address)
          (let ((smtpmail-smtp-server (nth 3 account))
                (smtpmail-stream-type (nth 4 account))
                (smtpmail-smtp-service (nth 5 account))

          (address ,user-mail-address)
          (signature-file "~/.signature")
          ("X-Jabber-ID" ,db/jabber-id)))
       ;; XXX: this should be abstracted away in some kind of function
       (mapcar (lambda (account)
                 (let ((account-name (nth 1 account))
                       (account-address (nth 0 account)))
