# Some Mailgun provider legacy variables are not supported

> Source: https://docs.strapi.io/cms/migration/v4-to-v5/breaking-changes/mailgun-provider-variables

In Strapi 5, legacy Mailgun provider variables `apiKey` and `host` are no longer supported; use `key` and `url` instead.

In Strapi 5, the support is dropped for some legacy variables deprecated in Strapi v4 for the Mailgun provider.

This page is part of the [breaking changes database](/cms/migration/v4-to-v5/breaking-changes) and provides information about the breaking change and additional instructions to migrate from Strapi v4 to Strapi 5.

- Is this breaking change affecting plugins? Yes
- Is this breaking change automatically handled by a codemod? No

## 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

This section regroups useful notes and procedures about the introduced breaking change.

### Notes

A Mailgun [provider](/cms/features/email#providers) configuration in the [plugins configuration file](/cms/configurations/plugins) could look like the following example in Strapi 5:

```jsx title="/config/plugins.js"
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:

1. Rename `apiKey` to `key`.
2. Rename `host` to `url` and add `https://` in front of it so it is a proper URL.
