2

Integrating Swift Mailer Into Kohana 3

Posted (Updated ) in PHP

This is quite possibly one of the simplest integrations in Kohana history (It’s a 1 liner, folks). The following is a short tutorial on how to create a SwiftMailer module for Kohana 3.

Create the following files/folders:
/modules/swiftmailer
/modules/swiftmailer/init.php
/modules/swiftmailer/classes

Inside /modules/swiftmailer/classes/ drop the official latest build of Swift Mailer.

Enter the following into init.php.

<?php
	require Kohana::find_file('classes', 'Swift-4.0.6/lib/swift_required');

There. Wasn’t that easy? Remember to enable the module by adding it to your bootstrap.php file!