Closed Aldekein closed 3 years ago
The Python library is handling content-type differently than other headers; it is usually derived by the received mail system. If you omit from the command, what do you get?
Ross
If I'm not specifying content-type
or specifying another header declared in SMTPHeader
GAM works correctly.
Oleh,
Good to hear. The problem was content-type, it can't be explicitly declared, the API sets it to the appropriate values.
Ross
On Thu, Jan 7, 2021 at 9:51 AM Oleh Aldekein notifications@github.com wrote:
If I'm not specifying content-type or specifying another header declared in SMTPHeader GAM works correctly.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/taers232c/GAMADV-XTD3/issues/114#issuecomment-756274521, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCTYLY6IG5SOIJCP2OZE2TSYXYAXANCNFSM4VXRCAUQ .
-- Ross Scroggs ross.scroggs@gmail.com
Ok, thank you for confirmation. I supposed if it's listed in documentation it should work :)
GAM version
GAMADV-XTD3 5.31.01 Python 3.9.1 64-bit final google-api-python-client 1.9.3 httplib2 0.18.1 MacOS Catalina 10.15.7 x86_64
Steps To Reproduce
gam user aldekein@aldeke.in insert message labels INBOX,UNREAD,IMPORTANT content-type "text/html; charset=\"utf-8\"" subject "This fails" htmlfile "data/training.html"
will print an error:
Expected Result
A new email is inserted in the user's mailbox with the specified
content-type
header.Additional info
If the command is changed to insert another valid header listed in GamCommands.txt values for
<SMTPHeader>
(e.g. keywords) it will work and the header is added to email:gam user aldekein@aldeke.in insert message labels INBOX,UNREAD,IMPORTANT keywords "text/html; charset=\"utf-8\"" subject "This fails" htmlfile "data/training.html"