The release 5.0.0
is a major update of 4.x
with some breaking changes. If you are upgrading to 5.x
, please follow the read the below points and update your codebase.
First, move your transport configuration from app.php
to app_local.php
.
'EmailTransport' => [
'mailgun' => [
'className' => 'Mailgun.Mailgun',
'apiEndpoint' => 'https://api.mailgun.net/v3', // optional, api endpoint
'domain' => 'XXXXXXXXXXXXXXXXXX.mailgun.org', // your domain
'apiKey' => 'XXXXXXXXXXXXXXXXXX' // your api key
]
]
In 4.x
, MailgunEmail provided convenience methods to change the email. As of CakePHP 4.0 using Cake\Mailer\Email
is deprecated, so we've added a new MailgunTrait that works on Cake\Mailer\Email
and Cake\Mailer\Mailer
. And a default Mailgun\Mailer\MailgunMailer
to support upgrading CakePHP 3.x code to CakePHP 4.x code.
- Custom Headers
- Additional Options
- And more...
Please use appropriate method to set headers, options, recipient variables, etc.
If you face any issue or errors while upgrading, please open an issue here.