Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 1.34 KB

UPGRADE.md

File metadata and controls

28 lines (22 loc) · 1.34 KB

Upgrade from 4.x to 5.x

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.

Configuration

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

Usage

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.

Please use appropriate method to set headers, options, recipient variables, etc.

Problem?

If you face any issue or errors while upgrading, please open an issue here.