- What PHP versions are supported?
- What credentials do I need to add on the settings page?
- How can I define a plugin setting to be used for all sites?
- How do I use SendGrid with the WP Better Emails plugin?
- Why are my emails sent as HTML instead of plain text?
- Will contacts from the widget be uploaded to Marketing Campaigns or Legacy Newsletter?
- What permissions should my API keys have?
- Can I disable the opt-in email?
- Can I change the content of the emails before they are sent?
- Can the SendGrid Plugin be used on a multisite network?
- Can I use shortcodes to customize the subscription confirmation page?
- Can I use this plugin with BuddyPress?
Plugin versions 1.11.x were tested and confirmed to work on PHP 5.4, 5.5, 5.6, 7.0, 7.1. It DOES NOT work on PHP 5.3 and earlier. Plugin versions 1.10.x were tested and confirmed to work on PHP 5.3, 5.4, 5.5 and 5.6. It DOES NOT work on PHP 7.0 and later.
To define a plugin setting that you want to use on all of your WordPress sites, simply add it into your wp-config.php file. For example, the following API Key setting would be applicable across each of your WordPress sites:
If you have the WP Better Emails plugin installed and you want to use the template defined here instead of the SendGrid template, you can add the following code in your functions.php file from your theme:
1 2 3 4 5 6 7 8 9 10 11 12
Using the default templates from WP Better Emails will cause all emails to be sent as HTML (i.e. content-type of text/html). In order to send emails as plain text (i.e. a content-type of text/plain) you should remove the HTML Template from WP Better Emails settings page. This is can be done by removing the
%content% tag from the HTML template.
For a detailed explanation of why your emails might be converted to HTML instead of plain text, please see this helpful article in our Classroom.
The contacts will only be uploaded to Marketing Campaigns.
For the API Key used for sending emails (the General tab): – Full Access to Mail Send. – Read Access to Stats. – Read Access to Suppressions > Unsubscribe Groups. – Read Access to Template Engine. For the API Key used for contact upload (the Subscription Widget tab): – Full Access to Marketing Campaigns.
No. SendGrid’s Email Policy requires that all email addresses sent to by SendGrid customers be confirmed via an opt-in email. In other words, every recipient of an email sent via SendGrid must actively confirm their desire to receive that email by means of an opt-in confirmation.
Yes, you can change the content by adding a filter. You need to declare a function that takes the content of the email as an argument and then call
add_filter() with the name “sendgrid_mail_text” or “sendgrid_mail_html”, depending on what part of the email you want to change.
If you want to change the text content of all emails before they are delivered, add the following to the functions.php file of your WordPress installation.
1 2 3 4 5
If you want to change the HTML content of all emails before they are delivered, simply add the following to the functions.php file of your WordPress installation.
1 2 3 4 5
Please note: what is changed in your emails depends on the content-type that you have set in the settings page or overwritten in a filter.
For “text/plain,” only the text part is overwritten by the filter. For “text/html,” both the text and the HTML filters are called.
The code snippets above are usually added in the functions.php file of your theme.
Yes. This plugin has basic multisite network support.
To use the SendGrid plugin on your multisite network, navigate to your WordPress dashboard and click My Sites, select Network Admin, and click on Plugins. Under the SendGrid WordPress plugin, click Network Enable.
The settings for all sites in the network can only be configured by the network admin in the Network Admin dashboard.
Please note: Since 1.10.5 the Network Admin can delegate the configuration for each subsite to their respective owners. This will allow any subsite to use it’s own SendGrid Plugin configuration.
Yes. You need to create custom page and select it from the settings page. You can place any of these shortcodes in the body of that page. Here’s an example :
1 2 3 4
You need to enable the use of the First Name and Last Name fields from the settings page in order to use the shortcodes for them.
Yes. Our plugin required special integration with BuddyPress and it’s regularly tested to ensure it behaves as expected. If you have noticed issues caused by installing this plugin along with BuddyPress, you can add the following line to your
wp-config.php to disable it :