Decrypted email display as source in outlook


I did not know where to ask, so here is a good start

I send an encrypted email in python and I can decrypt it with gpgOL menu in outlook

  • for some reason I always have to open the mail to have that “decrypt” option while it could be available in the main menu

  • more embarassing for end user, once they decrypt the mail, outlook displays the whole mail source, and user dont undertand what’s going on

I dont know if it is an outlook issue or gpgOL

thanks (let me know if you need more infos)



We are working on improving this. In GpgOL since 2.3.1 you can enable “The simplified interface (experimental)” in the options dialog (which you can open with the error in the bottom right corner of the GpgOL “General” group)

With this messages will be decrypted automatically even in preview mode. We have some issues with it. (See ) for some issues we want to fix before making this default.

But for the mail you have recieved: This is a weird case. It’s a PGP/Inline mail (meaning the encrypted message is part of the mailbody) which in turn contains a MIME Structure (which you call the mail source). I’m not sure even with the new interface this would be handled.

Basically for GpgOL it looks like the Mail source is the message and not a Mail. As if the sender did “view source” and copied the contents of that into their Mail editor and then encrypted that.

Do you know how this mail was created? I’m not aware of any mailclient so far that sends encrypted mails that way.

ok so it’s in python that there is a problem

I actualy create my mail as usual, add all attachements (multipart email)
then I encrypt everything

I guess I’ll check in python forums


to create a new encrypted email (in OpenPGP/MIME format) you
have to make sure to encrypt the right mime-parts and set them accordingly.
As far as I know the python email module does not offer a convenience function
for this, so you would need to do it manually.


“have to make sure to encrypt the right mime-parts and set them accordingly.”

what do you mean ? encrypt the righ mime part ?

When creating an OpenPGP/MIME email (which is the recommended format),
you need to follow the format described in rfc3156 about the format
and mimetypes of the email itself and the mime-parts within the encrypted part.

I use high level python functions from GPG library so I guess they are rfc compliant

What module are you using?
If it is, that does not use
the recommended method to access gnupg and I could not see any
MIME functionality in its docs.

ok I did’nt know