RStudio Connect Secure Email

Hello :slight_smile:

I have attempted to use the package 'blastula' to send automated emails using RStudio Desktop. I am aware that I could use gmail and use 'less secure apps', but that is not something I want to use. Currently we use Microsoft Outlook, but all emails are sent through Mimecast SMTP for additional security. At the moment, if I try to send an email using 'blastula' on RStudio Desktop, I receive a login denied message.

I am keen to learn if there is a secure way to send emails out if we go with RStudio Connect - or will I run into exactly the same issue?

Much appreciate your advise.

Hey @Ahnnuh ! Thanks so much for reaching out here, and fantastic question! Welcome to RStudio Community!

RStudio Connect does have an SMTP integration that would usually be setup by an administrator. This is used for sending emails when reports fail, and customized emails as a "report delivery mechanism" for R Markdown reports.

You can read more about our custom email integration / email customization here:

https://docs.rstudio.com/connect/user/rmarkdown/#r-markdown-email-customization

The important thing to keep in mind - this same email is sent to all subscribers for the report (or report "variant" if using parameterized R Markdown). I.e. there is not any email "personalization" today, so sending emails like "Hi Cole" and "Hi Sally" from the same report is not an "out of the box" feature for Connect today.

However, if you are looking to distribute an automated / scheduled email version of a report to a group of coworkers, then this feature should work nicely! (Connect also keeps track of all of the report versions / history too).

If discussing your use case in more detail would be useful, we would be happy to set up a call if you shoot an email to sales@rstudio.com :smiley: We can also give you a walkthrough of the product so you can more accurately determine whether it will meet your needs. Alternatively, feel free to ask any other questions you have here and we are happy to dig into more detail :slight_smile:

In the open source world, you can have a look at blastula::create_smtp_creds_file() or blastula::smtp_send(). You are right that there is often authentication required for an SMTP server. In the Connect model, the IT department would usually set up an authenticated connection between Connect and the SMTP server, and then R users can make use of that through Connect without any credential hassle.

In the alternative approach, your IT department will give you credentials to the SMTP server and then you will use blastula::smtp_send() to talk to the SMTP server directly (instead of using Connect as an intermediary). You can also utilize this type of behavior on Connect too, which some users do if they want to do more dynamic email generation / personalization.

I hope that is helpful!

I have sent an email - Thank you Cole :slight_smile:

1 Like