“emayili”包中出现 R 错误。
# Create a message object..
# Add addresses for the sender and recipient.
# Add a subject.
# Add a text body.
to_send<- envelope(to = "xxx@gmail.com",
from = "xxx@gmail.com",
subject = "ALERT",
text="xxx")
smtp<- server(host = "smtp.gmail.com",
port = 465,
username = "xxx@gmail.com",
password = "password form less secure apps setting")
Run Code Online (Sandbox Code Playgroud)
我的说法是错误的, Error: Request failed after 5 attempts
我实际上用在线 SMTP 测试工具测试了几次,看来它可以工作。我检查了一下rlang::last_error(),输出是:
<error/purrr_error_rate_excess>
Request failed after 5 attempts
Backtrace:
1. emayili:::smtp(msg, verbose = TRUE)
2. purrr:::send_mail(...) …Run Code Online (Sandbox Code Playgroud)