-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
On 08/18/2013 12:13 PM, Patrick Brunschwig wrote:
> I'd say go ahead using X-Enigmail-Draft-Status and leave it up to
> the user to decide for inline-PGP vs. PGP/MIME. And yes, you'll
> need to set it to nsIEnigmail.SEND_ENCRYPTED. But looking at the
> code, I think you also need to add functionality to enable
> encrypted messages (see getMsgPropertiesCb).
Okay, so I added the following to my send code:
fields.otherRandomHeaders += "x-enigmail-draft-status: "+
Components.interfaces.nsIEnigmail.SEND_ENCRYPTED +"\r\n";
(Which is pretty much exactly what is done in setDraftStatus in
enigmailMsgComposeOverlay.js)
Then I modified enigmailMsgComposeOverlay.js@getMsgPropertiesCb to
look like this (differences marked with "+", logging removed for brevity):
const nsIEnigmail = Components.interfaces.nsIEnigmail;
const SIGN = nsIEnigmail.SEND_SIGNED;
+ const ENCRYPT = nsIEnigmail.SEND_ENCRYPTED;
var flags = 0;
if (mimeMsg && mimeMsg.headers["x-enigmail-draft-status"])
flags = Number(mimeMsg.headers["x-enigmail-draft-status"]);
if (flags & SIGN) Enigmail.msg.setSendMode('sign');
+ if (flags & ENCRYPT) Enigmail.msg.setSendMode('encrypt');
If I try it like this, I am getting a new mail, unencrypted, with a
second recipient "x-enigmail-draft-status: 2". Also, according to the
logs, getMsgPropertiesCb is never called. So there seems to be at
least one, probably two problems here.
As I do not have enough experience with the Enigmail Source yet, I
have no idea where even to begin to look for them. So I would be very
grateful for an idea on what to do next. If we want to keep the ML out
of this (I don't know if this is interesting or annoying for everyone
else on [Enigmail]), we can take this to personal eMail as well, if
you want.
Thanks in advance,
Max
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQJ8BAEBCgBmBQJSEKTFXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4NEM0ODA5N0EzQUY3RDU1MTg5QTc3QUMx
NjlGOTYyNDM0MDg4MjVFAAoJEBafliQ0CIJeLncQAMJj07sg8BIpbzIYdvq7/99t
rZFKR2bLS32n9ONFqFWMA1k8gcRC6SkbRNd/HgbJGPmeon3rBzo1uVRAukz0rWBf
V8QRafylxTPYXcS5niaYPR4PyCneC0Av+E6/8l8La33wTAotoupxg95+i+FOlp8T
Qa77j41yByFqcqpnXz+HrYydgPs8GgtEe4bKrRHD4mi4kePp1zohbTcVj4iAQAMy
DdK+vpXtYEJzXCGGDxQVbWLKvZ/M2k9av/p84NtQr0yuMhNS3Mh/kSuh+j5x++Fd
mMJ96UAyWxiteOfbs4B0VdUkAn36H0+IBFe5jNCnwQ+UlO0YWZ+jjryzrVFiEzin
K/UOkV+c1bt1WSIbICR8RBUjpT6lYlO6xXK+mxG+nVLb1Htf2IOkN0Q7v6BLcAcX
JFz1zC2SiBUqB/Pf7i5LkHvMd+nWFQiYnewpxqckxDSRVHXUeN6O7x7O1dp96toW
kqGsSYEsc1IQPTGCgVr0G29iHlqogb+T/q4bFbLYA43VoZTELSYUtRZLfNAAVhVb
ow7UGT1FIdwVbPscMyG56MnE0+DPZMQH9Rf6UxTLbXAt2iy+VY4u5/Y3EzhDgrDa
+zftQwpwTGYjp6Fi6utSWTAkC9uCdzo1ZH9Yz5rw0bl+0+ulciONV9/mGKL9AP+g
qVRvcJEQ7pLCm9g4KIVg
=GPLi
-----END PGP SIGNATURE-----
_______________________________________________
enigmail-users mailing list
[email protected]
https://admin.hostpoint.ch/mailman/listinfo/enigmail-users_enigmail.net