Skip to content

Incorrect encoding with Subject part of a mail #76

@grepinsight

Description

@grepinsight

I am trying to send a email with Korean text in the Subject. It doesn't get encoded correctly, even thought it does in body:

Here's a minimal reproducible sample.

use_secret_file("my_gmailr.json")
mail_title <- "[test]  안녕"
test_email <- mime(
  To = "myemailgmail.com",
  From = "myemailgmail.com",
  Subject = mail_title,
  body = " 
contents. 한국어
  ")
send_message(test_email)
# In gmail
Subject: [test] 안녕      # somehow encoding/decoding get's messed up
Body: contents. 한국어  # renders it fine

Here's my sessionInfo

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] gmailr_0.7.1

loaded via a namespace (and not attached):
 [1] httr_1.2.1      magrittr_1.5    R6_2.1.2        tools_3.3.1     base64enc_0.1-3 curl_0.9.7     
 [7] crayon_1.3.2    stringi_1.1.1   jsonlite_1.2    openssl_0.9.4  

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