Error inserting special characters in gmailr::gm_subject()

Asked

Viewed 14 times

0

I prepared a script to automate the sending of emails using the gmailr.

However, when I put some special character in the Email Subject, it sends only a sequence of codes instead.

Example:

Script:

      mensagem <- gmailr::gm_mime() %>% 
                  gmailr::gm_to('[email protected]') %>%  
                  gmailr::gm_from('[email protected]') %>% 
                  gmailr::gm_subject('Certificado - Seminário X ', 
                                     content_type = 'text/plain', 
                                     charset = 'utf-8', 
                                     encoding = 'quoted-printable'
                                     ) %>% 
                  gmailr::gm_html_body('<html>
                                       Estimados, bom dia! <p>
                                       Segue certificado do seminário. <p>
                                       Atenciosamente, <br> 
                                       Escola
                                    </html>') %>% 
                  gmailr::gm_attach_file(paste0("aluno.pdf"))
             
      gmailr::gm_send_message(mensagem)

Example of result: as in gm_subject() has the characters "-" and "á", the email sent has the subject similar to:

av45a5v4=5va45=a45vae45=4

How to insert special characters in the subject gm_subject() ?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.