logDebug ("encrypt attachments\r\n");
logDebug ("encrypt attachments\n");
MapiGPGMEImpl::encrypt (void){    gpgme_key_t *keys=NULL, *keys2=NULL;    bool isHtml = isHtmlMessage ();    char *body = getBody (isHtml);    char *newBody = NULL;    char **recipients = getRecipients (true);    char **unknown = NULL;    int opts = 0;    int err = 0;    size_t all=0;    if (body == NULL || strlen (body) == 0) {	freeRecipients (recipients);	if (body != NULL)	    delete_buf (body);	return 0;    }    logDebug ("encrypt\r\n");    int n = op_lookup_keys (recipients, &keys, &unknown, &all);    logDebug ("fnd %d need %d (%p)\r\n", n, all, unknown);    if (n != countRecipients (recipients)) {	logDebug ("recipient_dialog_box2\r\n");	recipient_dialog_box2 (keys, unknown, all, &keys2, &opts);	xfree (keys);	keys = keys2;	if (opts & OPT_FLAG_CANCEL) {	    freeRecipients (recipients);	    delete_buf (body);	    return 0;	}    }    err = op_encrypt ((void*)keys, body, &newBody);    if (err)	MessageBox (NULL, op_strerror (err), "GPG Encryption", MB_ICONERROR|MB_OK);    else {	if (isHtml) {	    char *p = addHtmlLineEndings (newBody);	    setBody (p, true);	    xfree (p);	}	else	    setBody (newBody, false);    }    delete_buf (body);    xfree (newBody);    freeRecipients (recipients);    freeUnknownKeys (unknown, n);    if (!err && hasAttachments ()) {	logDebug ("encrypt attachments\r\n");	recipSet = (void *)keys;	encryptAttachments (parent);    }    freeKeyArray ((void **)keys);    return err;}