FRE-681: Fix code review findings - body flag, PGP encryption, passphrase handling
- cmd/mail.go: Fix duplicate --body/--body-file flag binding (both used bodyFile) - internal/mail/client.go: Add PGP encryption to Send via EncryptBody, add passphrase to MoveToTrash and SendDraft - internal/mail/pgp.go: Store armored private key, add getUnlockedKeyRing helper, fix Decrypt/SignData/EncryptAndSign/DecryptAttachment to use passphrase via key.Unlock - internal/mail/pgp.go: Add EncryptBody method for Send encryption with sender key - cmd/draft.go: Update SendDraft call to include passphrase parameter
This commit is contained in:
@@ -260,7 +260,7 @@ func draftSendCmd() *cobra.Command {
|
||||
client.SetAuthHeader(session.AccessToken)
|
||||
mailClient := mail.NewClient(client)
|
||||
|
||||
if err := mailClient.SendDraft(messageID); err != nil {
|
||||
if err := mailClient.SendDraft(messageID, session.AccessToken); err != nil {
|
||||
return fmt.Errorf("failed to send draft: %w", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user