Using mailR on

I have a Shiny app that successfully sends email using the Mailtrap SMTP server through a call to mailR::send.mail, when I run it locally.

When I deploy this app on it fails.

I have read sendmailR won't work on Is mailR the same?

Perhaps this is a problem with configuring R to look at the correct JDK, since mailR depends on rJava?


You probably need to post the error message from the deployment, to get much useful feedback. I had a similar issue with using an R emailing package (emayili), which worked locally but could not deploy. I found a workaround for this issue, described here: [BUG]: Cannot deploy to · Issue #134 · datawookie/emayili · GitHub. Maybe this helps.