-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
html body is not being sent together with attachment #81
Comments
Right before I use |
Adding
Without I'm using the CRAN version 0.7.1 on R 3.5.0. |
Was this bug removed (of either being able to send attachment or body text but not both together). |
@aedobbyn while your suggested sequence mime() %>%
to(email) %>%
from(email) %>%
html_body(msg_body) %>%
attach_part(msg_body) %>%
attach_file(here("plt.png")) works but it will only work if msg_body is plain text. Is there any other recommended sequence for adding the following also?
|
@jimhester : please can you update us what happened to this bug fix? There aren't many packages in R with gmail API wrapper functions. It would be very nice if the |
I find that gmailR has some other bugs. Am raising them as separate issues. Kindly add a line to the above so we get some confidence that the R community is working. |
@jimhester - piggybacking on @sanjmeh 's request for an update above. Love this package and this bug fix would add a ton of value. |
There seems to be a nice workaround to get the HTML outputs too. All you need to do is attach_file() the .html along with the attachment. Following format works for me. email <- send_message(email) It appears that any argument needs to be passed to the 'html_body()' without which this wouldn't work. Hence the empty quotes there. |
This is now fixed without workarounds write.csv(iris, "iris.csv")
gm_mime() %>%
gm_from("[email protected]") %>%
gm_to("[email protected]") %>%
gm_subject("I bought you") %>%
gm_html_body('Some <b style="color:DARKVIOLET">flowers</b>!') %>%
gm_attach_file("iris.csv") %>%
gm_create_draft()
#> Draft Id: r-8123784243409940905
#> Thread Id: 16cab9854293de54 Created on 2019-08-19 by the reprex package (v0.3.0) |
That's great news. when is the update going on CRAN? |
@jimhester I'm sorry but unfortunately this is NOT FIXED at all : If I attach a .txt file to the gmailr MIME message, using @jimhester, you gave a partial workaround, which consists in creating a draft. Yes, There is also a similar bug with .pdf attachments, but with different behavior: Could someone reopen this bug which has been mistakenly closed? Many thanks |
I explained the cause of this bug in #202, and gave there a workaround. I hope that this will be useful. |
I want to send an attachment and write a message. Somehow it does not send the text. What I am doin' wrong?
text_content <- "Can you see that?"
html_msg = mime() %>%
to(send_to) %>%
from(send_from) %>%
html_body(text_content) %>%
subject(sb_to) %>%
attach_file(pathfile)
send_message(html_msg)
The text was updated successfully, but these errors were encountered: