Is there a gpgkeys_mailto for Win32?

Zuxy zuxy.meng at
Wed Jan 12 07:12:48 CET 2005

Or we can use simple MAPI instead.

#include <windows.h>
#include <mapi.h>

int main()
	MapiRecipDesc rcp[1];
	rcp[0].ulReserved = 0;
	rcp[0].ulRecipClass = MAPI_TO;
	rcp[0].lpszName = "Nice Keyserver";
	rcp[0].lpszAddress = "keyserver at";
	rcp[0].ulEIDSize = 0;

	MapiMessage msg;
	msg.ulReserved = 0;
	msg.lpszSubject = "Addkey";
	msg.lpszNoteText = "Blah blah blah patati patata";
	msg.nRecipCount = 1;
	msg.lpRecips = rcp;
	msg.nFileCount = 0;
	MAPISendMail(0, 0, &msg, MAPI_LOGON_UI, 0);

Linked against libmapi32.a. lpszNoteText dosen't have the 2K limit, I suppose.

On Wed, 29 Dec 2004 23:12:00 -0500, David Shaw <dshaw at> wrote:
> Looks like using mailto: is a non-starter whether from ShellExecute()
> or WSH.  The limit is 2k, and even smaller on some older versions of
> win32.  2k isn't enough to do much more than submit the very smallest
> of keys.
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6

More information about the Gnupg-users mailing list