Extend Cake\Mailer\Email allowing image inline in templates.
Since v3, CakePHP uses composer, the easiest way to set up is by either running
composer require fawno/fawnoemail
Whenever you need to send email, ensure this class is loaded:
use Fawno\Mailer\FawnoEmail;
Use the class as normal CakeEmail:
$email = new FawnoEmail();
$email->to(array('[email protected]' => 'Example'));
$email->subject('Example Email');
$email->template('default');
$email->send();
In template:
<img src="cid:/full/path/image">
<img src="cid:///full/path/image">
<img src="file:/full/path/image">
<img src="file:///full/path/image">
echo $this->Html->image('cid:///full/path/image');
echo $this->Html->image('file:///full/path/image');