【发布时间】:2021-12-01 18:35:03
【问题描述】:
我一直在设置 emayili 包以从我的 Outlook 帐户发送带有两个附件的电子邮件,但到目前为止我一直无法这样做。
代码如下(将电子邮件和密码替换为“aaa”和“bbb”以保护隐私/安全):
email <- envelope(
from = "aaa@domain.com",
to = "bbb@domain.com",
subject = subject,
html = body) %>%
attachment('filename1.xlsx') %>%
attachment('filename2.xlsx')
smtp <- server(host = "smtp.mailtrap.io",
port = 587,
username = "********",
password = "*********")
smtp(email, verbose = TRUE)
当我运行代码时,我得到以下结果:
> smtp(email, verbose = TRUE)
Sending email to smtp.office365.com:587/.
Error: Request failed after 5 attempts
Run `rlang::last_error()` to see where the error occurred.
In addition: Warning messages:
1: In smtp(email, verbose = TUE) :
restarting interrupted promise evaluation
2: In f(...) : restarting interrupted promise evaluation
3: In f(...) : restarting interrupted promise evaluation
4: In f(...) : restarting interrupted promise evaluation
5: In f(...) : restarting interrupted promise evaluation
知道出了什么问题吗?
【问题讨论】: