Closed kkoshijima closed 9 years ago
There seems to be other people who are struggling with the same problem.
http://apple.stackexchange.com/questions/92406/mail-does-not-work-in-scripts-launched-with-launchd
I've set AbandonProcessGroup to be true, but it's still not working... Any ideas?
Sorry, it appears that this is not a mailR issue.
Yes, it does seem so.
But still I'm assuming that sending emails automatically is a common way of how people would want to use mailR, and I think there are many other people who are relevant to this question.
Any suggestions on how you would use mailR in an automated fashion other than using launchd?
I got a very similar problem using mailR with R3.1.3 on a windows. Running a script like the one above interactive works just fine!
But when I am trying to run it non interaktiv e.g. in cmd:
"C:\Program Files\R\R-3.1.3\bin\i386\R.exe" --no-save <SimpleTestMail.R >SimpleTestMail.out
it does not work with the same error message:
error in ls(envir = envir, all.names = private) :
unvalid 'envir' argument`
Calls: <Anonymous> -> .jrcall -> .jcall -> .jcheck -> .Call
I set up the email first with:
email <- send.mail(..., send = FALSE)
then the command
email$send()
actually throws the error
I found out, what the problem was (for me): The McAfee antivirus software was blocking outgoing traffic on all ports for (allmost) all programs. Rgui.exe was on the exception list, whereas Rterm.exe wasn't. Adding an exception for Rterm.exe (outgoing) on port :25 fixed the problem
Oh dear! Glad you figured it out. Have fun..
Hi!
I am really enjoying this package, but I've run into this one problem which I can't figure out.
Below is my code for sending the email. I am trying to send it via Exchange.
The code works well when I execute it manually, but it gives the error below when I execute it automatically using launchd. (It does not give out the detailed error message even though I set
debug = TRUE
)Here is what I did.
i. I wrote the above code in a R script file (ex. myMail.R). ii. I made a bash script that runs the above script (ex. test.sh).
iii. I wrote the following launchd script.
iv. I loaded the launchd script in
~/Library/LaunchAgents/
With this, I was hoping that it would send the email every morning at 10 AM, but it doesn't work. The odd thing is that it does work when I do
sh test.sh
manually.Could you help me troubleshoot?
Thank you!