diff --git a/src/GamCommands.txt b/src/GamCommands.txt index fd574609..c3031ce9 100644 --- a/src/GamCommands.txt +++ b/src/GamCommands.txt @@ -8031,12 +8031,12 @@ gam export thread|threads [quick|notquick] [doit] [max_to_export ])|(ids ) [targetfolder ] [targetname ] [overwrite []] -gam forward message|messages recipient|to +gam forward message|messages [recipient|to] (((query [querytime ]*) (matchlabel ) [or|and])+ [labelids ] [quick|notquick] [doit] [max_to_forward ])|(ids ) [subject ] [addorigfieldstosubject []] [altcharset ] -gam forward thread|thtreads recipient|to +gam forward thread|thtreads [recipient|to] (((query [querytime ]*) (matchlabel ) [or|and])+ [labelids ] quick|notquick] [doit] [max_to_forward ])|(ids ) diff --git a/src/GamUpdate.txt b/src/GamUpdate.txt index db09aa8f..4f063874 100644 --- a/src/GamUpdate.txt +++ b/src/GamUpdate.txt @@ -1,3 +1,11 @@ +7.43.10 + +Updated `gam forward message|thread [recipient|to] ` to not forward messages +to the `Bcc` recipients of the original message. + +Fixed bug in `gam forward message|thread [recipient|to] addorigfieldstosubject` +where the recipient of the forwarded message was added to the subject line instead of the recipient of the original message. + 7.43.09 Fixed bug in `gam print filelist` that caused a trap. diff --git a/src/gam/__init__.py b/src/gam/__init__.py index 265f0b6e..e1f5b44a 100755 --- a/src/gam/__init__.py +++ b/src/gam/__init__.py @@ -25,7 +25,7 @@ https://github.com/GAM-team/GAM/wiki """ __author__ = 'GAM Team ' -__version__ = '7.43.09' +__version__ = '7.43.10' __license__ = 'Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)' # pylint: disable=wrong-import-position @@ -74595,10 +74595,10 @@ def _decodeHeader(header): stderrWarningMsg(Msg.INVALID_CHARSET.format(mg.group(1))) return header -# gam forward message|messages recipient|to +# gam forward message|messages [recipient|to] # (((query [querytime ]*) (matchlabel ) [or|and])+ [quick|notquick] [doit] [max_to_forward ])|(ids ) # [subject ] [addorigfieldstosubject []] [altcharset ] -# gam forward thread|threads recipient|to +# gam forward thread|threads [recipient|to] # (((query [querytime ]*) (matchlabel ) [or|and])+ [quick|notquick] [doit] [max_to_forward ])|(ids ) # [subject ] [addorigfieldstosubject []] [altcharset ] def forwardMessagesThreads(users, entityType): @@ -74701,16 +74701,16 @@ def forwardMessagesThreads(users, entityType): msgSubject = f"Fwd: {_decodeHeader(message['Subject'])}" else: msgSubject = f"Subject: {subject}" - for header in ['To', 'Cc', 'Subject']: + for header in ['To', 'Cc', 'Bcc', 'Subject']: if header in message: del message[header] - message['To'] = msgTo if addOriginalFieldsToSubject: msgSubject += ' (Original' for header in ['From', 'To', 'Date']: if header in message: msgSubject += f' {header}: {message[header]}' msgSubject += ')' + message['To'] = msgTo message['Subject'] = msgSubject try: result = callGAPI(gmail.users().messages(), 'send',