Hello,
I'm trying to use mailr to send automatic emails from within the company that I'm interning. I can make this code work using my school email; however, it fails when I use my company email:
send.mail(from = "me@companydomain.com",
to = c("coworker@companydomain.com"),
subject = "Test Email",
body = "Hi Coworker! Did this email send?",
authenticate = TRUE,
smtp = list(host.name = "smtp.office365.com",
port = 587,
user.name = "me@companydomain.com",
passwd = "Password1",
sls = TRUE,
tls = TRUE),
debug = TRUE)
Because I was getting errors, I turned on debug. It turns out, my code was able to get on the server, etc, but something is failing with the authentication (and I've checked multiple times--I have the right user name and password). Debug throws these errors:
How can I get around this while maintaining security? Again, I know that my code works because I can send emails from my school Outlook email address--its only with my company.
Hello, I'm trying to use mailr to send automatic emails from within the company that I'm interning. I can make this code work using my school email; however, it fails when I use my company email:
send.mail(from = "me@companydomain.com", to = c("coworker@companydomain.com"), subject = "Test Email", body = "Hi Coworker! Did this email send?", authenticate = TRUE, smtp = list(host.name = "smtp.office365.com", port = 587, user.name = "me@companydomain.com", passwd = "Password1", sls = TRUE, tls = TRUE), debug = TRUE)
Because I was getting errors, I turned on debug. It turns out, my code was able to get on the server, etc, but something is failing with the authentication (and I've checked multiple times--I have the right user name and password). Debug throws these errors:
DEBUG SMTP: Attempt to authenticate using mechanisms: LOGIN PLAIN DIGEST-MD5 NTLM DEBUG SMTP: AUTH LOGIN command trace suppressed DEBUG SMTP: AUTH LOGIN failed
How can I get around this while maintaining security? Again, I know that my code works because I can send emails from my school Outlook email address--its only with my company.
Thanks!