mailR icon indicating copy to clipboard operation
mailR copied to clipboard

mailR sometimes does not respect port parameter

Open rpremraj opened this issue 8 years ago • 4 comments

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

rpremraj avatar Jan 18 '17 07:01 rpremraj

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.

The-Dub avatar Jan 19 '17 14:01 The-Dub

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.

rpremraj avatar Jan 20 '17 09:01 rpremraj

I had the same issue using Outlook. As indicated, setting tsl = TRUE instead of ssl = TRUE worked.

efh0888 avatar Feb 20 '17 17:02 efh0888

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

jcolomb avatar May 26 '17 07:05 jcolomb