Problem sending utf-8 display name in Gmail API
Problem sending utf-8 display name in Gmail API Question: So I have a function which I use to send emails through Gmail API: def send_email(payload, messagesubject, sendtoaddresses, key_file_path: str, subject: str): messagedraft = MIMEText(payload, "plain") mailservice = build_mail_service(key_file_path, subject) messagedraft["From"] = f"Display name <{subject}>" messagedraft["Subject"] = messagesubject for address in sendtoaddresses.split(","): if "To" in messagedraft: …