You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Weird bug here. If I send an email with a subject line containing an accented character, it works fine as long as the subject is 55 characters long or less:
The text was updated successfully, but these errors were encountered:
mikeblazanin
changed the title
Subject becomes garbled when it's contains accented character and more than 55 characters
Subject becomes garbled when it contains accented character and more than 55 characters
Sep 11, 2023
I'm not working on gmailr right now, so this is a very superficial reaction. But if you were highly motivated to look into this, I'd start by sending the same test cases directly from the Gmail API using the "Try It" feature from pages like this: https://developers.google.com/gmail/api/reference/rest/v1/users.drafts/create. That will allow you to figure out if this is an API limitation or something janky about how gmailr uses the API. No promises about what you would learn, but it would probably be productive.
Might be a little late to the party and I'm also not the developer, so take my comments with a pinch of salt, but I had a similar issue with accents messing everything up.
A workaround that has worked just fine is to define this function to specify the proper encoding:
Weird bug here. If I send an email with a subject line containing an accented character, it works fine as long as the subject is 55 characters long or less:
When viewed in gmail, the subject line reads as intended.
But if the subject line is 56 characters long (or longer), it comes out garbled:
When viewed in gmail, the subject line reads as: "=?utf-8?B?w6FhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh"
Other notes: subject lines without accents more than 55 characters do just fine. The error still appears if you create a draft then send the draft.
Session info: I'm using a cached login to set up my authorization before running the example code above
The text was updated successfully, but these errors were encountered: