Email

Posit Connect has a number of features that depend on sending emails. Some examples include delivering content via email, sending administrative notifications, reporting job failures or even additional security.

Notifications

By default, Posit Connect sends email notifications for the following events:

  • Test messages to help validate email sending; sent to the email address of the requesting administrator.

  • New account creation; sent to the email address associated with the new account.

  • Account email address change; notification email sent to old address and confirmation email sent to new address.

  • Reset password requests; confirmation email sent to the address associated with the account.

  • Requests for additional account privileges (e.g., viewer => publisher); sent to administrators.

  • Requests for content access; sent to content collaborators.

  • Scheduled reports configured to email on completion; sent to targeted recipients.

  • On-demand report-emails; sent to target recipients.

  • Report rendering errors; sent to content collaborators.

  • Warnings about nearing license expiration; sent to administrators.

Additional recipients for some email notifications can be configured via the Notifications setting.

Post-install behavior

Posit Connect installs with all email features disabled until an email provider is configured properly. Specifically, this is what to expect:

  • Built-in password authentication will not be able to send emails to users with new account confirmation or password reset links. An administrator will be responsible for obtaining these links from the user profile page in the dashboard and pass them along to the user via other means.

  • Notifications such as licensing limits, user requests for more privileges, or content errors will only be written to the logs. A list of Notifications is shown below.

  • Content delivery via email will be disabled.

Configuring an email provider

Note

Versions of Posit Connect before 1.7.4 allowed the email settings to be configured via the dashboard interface. These email settings were moved to a migration file and they should be transferred to your configuration file at your earliest convenience. See more about configuration migration in the Migration configuration appendix.

Posit Connect supports two options for sending emails: SMTP or sendmail. These options can be configured via the setting Server.EmailProvider.

Sendmail

Sendmail is a mechanism for sending emails using the existing setup of the Linux installation that hosts Posit Connect.

Different Linux distributions have their own implementation compatible with Sendmail. Refer to your server’s documentation to configure it.

SMTP

SMTP allows Posit Connect to establish a direct connection to an email server for sending emails. In the Posit Connect configuration file, you must provide the host and port of your SMTP server, user credentials if this server requires authentication, indication of whether the connection will be encrypted, and what encryption method will be used.

All SMTP options are described in the SMTP configuration appendix. The SMTP settings are reloadable. This means that Posit Connect does not need to be restarted to use new settings. Learn more about reloadable settings in the Reloadable Properties configuration appendix.

Note

The SMTP.Password can be encrypted to avoid credential leakage. See the Property Types configuration appendix for details.

Example email settings

The example below shows a basic SMTP email configuration reference:

; /etc/rstudio-connect/rstudio-connect.gcfg
[Server]
Address = "https://posit-connect.company.com"
EmailProvider = "SMTP"
SenderEmail = "account@company.com"

[SMTP]
Host = "smtp.example.com"
Port = 587
User = "service-user"
Password = "service-password"

For more information about configuring email settings and additional sample configurations, see the Server Address section of this guide.

Testing the email settings

You can see and test your current email settings from the Posit Connect dashboard in the Admin>Mail Settings panel. By sending a test email from this page you can confirm that the email features work properly.

Configuring other email settings

There are a few other settings that should be configured in order to send emails from Posit Connect.

Customizing the address on emails

It is expected that emails sent from Posit Connect come from a known email address within your organization. This address must be configured using Server.SenderEmail.

Customizing the display name on emails

The Server.SenderEmailDisplayName setting can be used to configure an alternate name for the server when sending system emails (e.g. “My Posit Connect Server”). If there is no alternate name provided, then “Posit Connect” will be used by default.

Customizing the subject prefix

The subject line of emails sent from Posit Connect will be prefixed with “[Posit Connect].” If you wish to change this prefix use the setting Server.EmailSubjectPrefix.

Allowing sending email to all users

When delivering content via email, initially there will be no option to send to all users. If there is need to do so, please enable that by using the setting Server.MailAll.

Configuring To fields to avoid spam false positives

By default, Posit Connect will send emails to recipients as BCC (blind carbon copy) so recipients will not have knowledge of each other’s email addresses. In some situations the email provider of the recipients will detect that a number of users received a BCC copy of the same email and that will trigger the spam detection. If you see this behavior, the setting Server.EmailTo should be configured with a “no-reply” email address from your organization.

Sending email from user email addresses

If you would like emailed reports sent by Posit Connect to appear as if they were sent by the content owner’s email address, then you can enable the setting Server.EmailFromUserAddresses. This will modify the message’s From header to use the content owner’s email address and the Sender header will use the configured Server.SenderEmail. This setting may not be compatible with all email servers. Check with your email administrator to find out if your email server can support messages sent on behalf of other users via the Sender header.

Note

Using the Server.EmailFromUserAddresses configuration may require some additional configuration on the part of your email administrator. Some email providers require additional verification proving that you own the addresses used to send emails. Check with your email administrator about limitations of the From and Sender headers.

Note

If you need additional privacy of the email addresses within your own organization, the setting Server.HideEmailAddresses can be used to hide all email addresses in the dashboard. Users will not be able to see each other’s emails. Only administrators will be allowed to see all emails.

License-related emails can be configured using the settings from the Licensing section of the configuration file. See the Licensing configuration appendix for details.

Customizing email to contain HTML

HTML-based emails may be sent by Posit Connect. Complete documentation for how this is accomplished may be found in the Posit Connect User Guide.