import Intro from '/docs/snippets/breaking-change-page-intro.md'
import MigrationIntro from '/docs/snippets/breaking-change-page-migration-intro.md'
Some Mailgun provider legacy variables are not supported#
In Strapi 5, the support is dropped for some legacy variables deprecated in Strapi v4 for the Mailgun provider.
Breaking change description#
In Strapi v4
Mailgun provider options can use the legacy apiKey and host variables.
In Strapi 5
Mailgun provider options can not use the legacy apiKey and host variables and must use the key and url variables instead.
Migration#
Notes#
A Mailgun provider configuration in the plugins configuration file could look like the following example in Strapi 5:
module.exports = ({ env }) => ({
// ...
email: {
config: {
provider: 'mailgun',
providerOptions: {
key: env('MAILGUN_API_KEY'), // Required
domain: env('MAILGUN_DOMAIN'), // Required
url: env('MAILGUN_URL', 'https://api.mailgun.net'), //Optional. If domain region is Europe use 'https://api.eu.mailgun.net'
},
settings: {
defaultFrom: 'myemail@protonmail.com',
defaultReplyTo: 'myemail@protonmail.com',
},
},
},
// ...
});
Manual procedure#
If you were using the legacy parameters:
- Rename
apiKeytokey. - Rename
hosttourland addhttps://in front of it so it is a proper URL.