blastula
blastula copied to clipboard
cron jobs
I have tried blastula on Mac Catalina using RStudio, R interface and R script command line. All works as expected.
I have made a daily report cron job. But the blastula::smtp_send
with gmail gives following error:
curl::curl_fetch_memory(url, handle = h) : RCPT failed: 553
Thank you for this package and your help for the cron jobs is appreciated.
Just curious, have you tried this with a different email server (i.e., not Gmail)? Also, does the log from the cron job show anything suspect w.r.t. Gmail?
From RStudio with gmail I get the memory error on first trial but I can run it on next try. Apart from these curl_fetch_memory errors I did not get any relevant error.
> source("~/AutoJournalWatch/R/email_new_articles.R")
Error in curl::curl_fetch_memory(url, handle = h) :
LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60
> source("~/AutoJournalWatch/R/email_new_articles.R")
The email message was sent successfully.
I also tried hotmail. But the new id in chain list is also gmail and it did not work.

I have added cron as a privileged access in keychain access app. I will try to see if it works and let you know.

- With cron jobs I get following error. Sorry the message is a mixture of English, German and Turkish, because of different download locations I suppose. I think finding the key_name is the problem here.
Fehler in stop("There is no blastula key that corresponds to the `key_name` of \"", :
'key_name' nesnesi bulunamadi
Ruft auf: <Anonymous> -> <Anonymous> -> get_smtp_keyring_creds
Calistirma durduruldu
- With RStudio, R interface and command line I sometimes get memory errors:
Error in curl::curl_fetch_memory(url, handle = h) : RCPT failed: 553
- I have many successful emails on the other side. Thank you for your efforts.
Best wishes.
The error I am getting in cron jobs is below:
blastula::smtp_send(blastula::compose_email(body = blastula::md("Knitted ")),
from = from,
to = to,
subject = "Knitted report",
credentials = blastula::creds_anonymous(...))
Error in file(open = "w+b", encoding = "UTF-8") :
cannot open the connection
Calls: <Anonymous> ... freduce -> withVisible -> <Anonymous> -> gfsub -> file
In addition: Warning message:
In file(open = "w+b", encoding = "UTF-8") :
cannot open file '/home/<user>/tmp/Rtmpx5cmBZ/Rfffd818a70775': No such file or directory
Backtrace:
[90m 1. [39mblastula::compose_email(...)
[90m 10. [39mblastula:::gfsub(...)
[90m 11. [39mbase::file(open = "w+b", encoding = "UTF-8")
the tmp drive is a subdir of ~
due to security policy and is made possible with this ~/.bash-profile entry, but fails without the entry as well.
TMPDIR=~/tmp
export TMPDIR
I am getting a RCPT failed: 501
curl-error both on my Mac and on RSConnect when SSL/TLS is disabled (can't enable due to custom certificate). I think this is probably the same issue (also found this on stackoverflow).