Ok, I wrote up a small hack, maybe this is already implemented but I find it useful. Comments are welcome. (defun mml-attach-pgpkey-mime () "Short hack to attach the own public `gpg' key." (interactive) (save-excursion (let* ((current (current-buffer)) (pgp-pubkey-temp-file (make-temp-file "pgp-public-key"))) (find-file pgp-pubkey-temp-file) (kill-region (point-min) (point-max)) ;just in case! (pgg-insert-key) (write-file pgp-pubkey-temp-file) (switch-to-buffer current) (mml-attach-file pgp-pubkey-temp-file "application/pgp-signature" "pgp-key" "attachment"))))