Skip to content

Email

WordPress environments on the VIP Platform are configured to route transactional email (e.g., password resets, user registration notifications) through WPVIP’s mail servers.

By default, transactional emails are sent from the email address donotreply@wpvip.com. It is possible to override the default sender’s email address and send emails from a custom domain instead.

The WordPress wp_mail() function can be used in custom code to send small amounts of emails to admins or other specific email addresses. But to prevent issues with spam, abuse, or other unwanted communications, any custom code using  wp_mail() should not generate (or allow users to generate) email messages to site users or user-supplied email addresses.

Limitations

Enable uploaded files to be sent as attachments

Media files that are uploaded to a WordPress site are not stored on the web container’s filesystem. Instead, uploaded files are stored in the VIP File System which is a separate object store. To send a file stored in the VIP File System as an attachment in an email, the VIP constant USE_VIP_PHPMAILER must be defined as true invip-config.php.

/vip-config/vip-config.php
define( 'USE_VIP_PHPMAILER', true );

Email logs

Customers can optionally add an email log plugin to have more visibility into outgoing emails. Email log plugins often provide the ability to verify that an email has been sent, where it has been set, when it was sent, and its content. When considering plugin candidates for an email log plugin, follow the guidelines for evaluating a third-party plugin before adding or enabling the plugin in a production environment.

Disable email

Use the vip_block_wp_mail filter to disable all outgoing emails from a WordPress site, including transactional emails (e.g., password resets, user registration notifications).

To disable emails, add the following code to a file in /client-mu-plugins:

/client-mu-plugins/file.php
add_filter( 'vip_block_wp_mail','__return_true' );



Last updated: May 15, 2024

Relevant to

  • WordPress