Closed ozmutley closed 2 years ago
I encountered the same problem. The server encountered an error when sending mail,The error information is as follows:request failed: POST https://old.protonmail.com/api/messages/C_Cg3g9GQzpOf4Ikfyofux37w0NcgkeBl38JMKsMvFXfyN4len3iNL7gjIKfjziPVXS27PBryC-SoAHfcCg-wA==: [2060] The EncToken does not match PGP message format.
Is this project still being maintained
I am receiving the same error message when trying to send an email. No issues with the protonmail webmail interface. Have tried running with -debug
. Not obvious to me what value EncToken
is supposed to have here.
{"ID":"QNYmcBybiB1yQyNLg78bp_bqm6bbIbfPmIVztt-kaCO4V2H17kLGG_rJrsWiBrX4QGunvbBY_Qd3mz1GfiVXA==",
"ExpirationTime":0,
"Packages":[{"Type":4,
"Addresses":{"anyone@gmail.com":{"Type":4,"BodyKeyPacket":"",
"AttachmentKeyPackets":null,"Signature":0,"PasswordHint":"",
"Auth":null,"Token":"","EncToken":""}},
"MIMEType":"text/plain","Body":"0sAtAQ053Jtbp9gA/NJRuCNWZUeXHJeRDVQ5aABBuD+1/PoJPAZBYjsv9rD5JXDGuVHhAvYREdutym2drxxesHGltHeShyLgLaOp3lMkNtq0xgfYUleAX0wFwEwOGe2iwUl+N9CR4r/p2nI9QU74SIssLK4VYgEZtH0axek8Fkd8n6FNlVRLRuHcSIwzEaVmIfo4mswmXX9Wju6+Th1X/GMkzCZxHSyWbV8Q/QsqnHcqNLOXtYwOVZG1tPpbgL2nTJHJt8fYYn1YAnxwyS4gGxMkQeY2s+8r6aZkphdJAse8uK1IMXHlmCjtJ5",
"BodyKey":{"Algorithm":"aes256","Key":"EG8UKRD/iADjksjAdx62d+LgrDHPZhj1BJmYo="}}]}
Looks like EncToken is never set in current code so it's serialized as an empty string. Likely it is no longer a valid value since a recent PM server update.
Removing EncToken completely fixes this issue for me for both mail.protonmail.com
and old.protonmail.com
endpoints
Cool, then we should add json:",omitempty"
to that field.
I have tested and it fixes the problem. Would you like a PR?
Yes please!
Thanks for the speedy resolution. The new release solves the problem for me.
Recently (since 3rd May 2022) I have been receiving the following error messages from hydroxide when trying to send emails:
554 5.0.0 Error: transaction failed, blame it on the weather: cannot send message: [2060] The EncToken does not match PGP message format.
The email is created as a draft in ProtonMail and I am able to manually send the email from the ProtonMail web client.
I have also attached the debug log from hydroxide and the payload when manually sending the email from the web client hydroxide.log protonmail_payload.txt