囊胚 R 包中的 add_attachment [英] add_attachment in blastula R package
本文介绍了囊胚 R 包中的 add_attachment的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在囊胚中发送附件.
How can I sent an attachment in blastula.
correo <- compose_email(
body = md("Tarea_01"))
correo %>% add_attachment(file = "emilia/tarea_01/liquenes.csv", filename = "liquenes")
correo %>%
smtp_send(
from = "xxxxxx@gmail.com",
to = "xxxxxxx@gmail.com",
subject = "Tarea_01",
credentials = creds_key(id = "gmail")
)
我可以发送电子邮件,但收到的电子邮件中没有附件.
I can send the email but there is no attachment in received email.
为什么没有附件的任何线索?
Any clue why there is no attachment?
曼努埃尔
推荐答案
刚刚偶然发现了这个较旧的问题 - 我相信问题出在您的第二个代码块中
Just stumbled over this older question - I believe the problem is in in your second code block
correo %>% add_attachment(file = "emilia/tarea_01/liquenes.csv", filename = "liquenes")
实际上并没有改变correo,您必须重新分配它或直接处理管道,例如
is actually not changing correo, you have to reassign it or directly proceed with the pipe, e.g.
correo %>%
add_attachment(file = "emilia/tarea_01/liquenes.csv", filename = "liquenes") %>%
smtp_send(
from = "xxxxxx@gmail.com",
to = "xxxxxxx@gmail.com",
subject = "Tarea_01",
credentials = creds_key(id = "gmail")
)
通过这种设置,我在附加某些东西时没有问题.
With this setup I don´t have problems with attaching something.
这篇关于囊胚 R 包中的 add_attachment的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文