4

R error in 'emayili' package.

# 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")

I got error with the saying Error: Request failed after 5 attempts I actually test several times with SMTP test tool online, it seems it would work. I checked with rlang::last_error(), the output is:

<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)

Then I run rlang::last_trace() to see the full context

<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)

Is there a way to fix it?

tyk
  • 45
  • 3

0 Answers0