- 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?
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.
The API Key used to authenticate sending email that you entered on the General tab should have Full Access to Mail Send and Read Access to Stats.
The API Key used when uploading contacts that you entered on the Subscription Widget tab should have Full Access to Marketings 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: you may not specify different plugin settings for each site in your network. The same settings will be used across your entire multisite network.