rpremraj / mailR

A utility to send emails from the R programming environment
http://rpremraj.github.io/mailR/
190 stars 57 forks source link

mailR sometimes does not respect port parameter #59

Open rpremraj opened 7 years ago

rpremraj commented 7 years ago

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

The-Dub commented 7 years ago

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.

rpremraj commented 7 years ago

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.

efh0888 commented 7 years ago

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

jcolomb commented 7 years ago

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