如何消除R中的emayili包中的错误

tyk*_*tyk 5 sendmail r sendmailr

“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(...)
 3. purrr::rate_sleep(rate, quiet = quiet)
 4. purrr:::stop_rate_excess(rate)
Run Code Online (Sandbox Code Playgroud)

然后我跑去rlang::last_trace()查看完整的上下文

<error/purrr_error_rate_excess>
Request failed after 5 attempts
Backtrace:
    x
 1. \-emayili:::smtp(msg, verbose = TRUE)
 2.   \-purrr:::send_mail(...)
 3.     \-purrr::rate_sleep(rate, quiet = quiet)
 4.       \-purrr:::stop_rate_excess(rate)
Run Code Online (Sandbox Code Playgroud)

有办法解决吗?