mailR
mailR copied to clipboard
mailR sometimes does not respect port parameter
Hello,
try to use mailR to send emails via R. Installed package and used your example for sending with attachment.
The process stops after a while with message:
Fehler: EmailException (Java): Sending the email to the following server failed : smtp-mail.outlook.com:465
What makes me wonder is that the port is given back as 465 although i specified in function 587
Is this package only working w/ gmail?
Please find code at bottom. Please note also that the params work fine from an python script. But it would be more convenient for me to use R…
Cheers, Rick
Hi, don't know if it helps, but be careful at the encryption used. If you used ssl encryption instead of tls with port 587, I noticed the port will be automatically set to 465. If you use tls = TRUE, then port 587 will be used.
Thanks for the feedback @The-Dub. I vaguely recall the same observation when I first looked into this issue a while ago. I will investigate this. If the port number is related to encryption, then I am afraid it's not a bug and I will document this in the ReadMe file.
I had the same issue using Outlook. As indicated, setting tsl = TRUE instead of ssl = TRUE worked.
From what I read on other website, it is possible that only the error message is affected but that mailR is indeed using the port instructed. See https://issues.apache.org/jira/browse/EMAIL-91
you may want to look into this too: https://stackoverflow.com/questions/31312720/emailexception-sending-the-email-to-the-following-server-failed-smtp-gmail-co