Skip to content

Non-ASCII characters in "To" header #78

@krlmlr

Description

@krlmlr

Example:

gmailr::create_draft(
  gmailr::mime(
    To = "Kirill Müller <krlmlr+r@mailbox.org>",
    Subject = "subject",
    body = "body"
  ),
  user_id = "me"
)

RFC 1342 (see #76 (comment)) doesn't seem to work here:

gmailr::create_draft(
  gmailr::mime(
    To = paste0(
      "=?utf-8?B?",
      base64enc::base64encode(charToRaw(enc2utf8("Kirill Müller <krlmlr+r@mailbox.org>"))),
      "?="),
    Subject = "subject",
    body = "body"
  ),
  user_id = "me"
)
## Error in gmailr_POST("drafts", user_id, class = "gmail_draft", query = list(uploadType = type),  : 
##   Gmail API error: 400
##   Invalid to header

This messes up revdep-check e-mails, might be easier to use only the e-mail address (and not the maintainer name) for now. CC @hadley.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions