• Developer guides

Sending emails

The Includable platform also contains the ability to easily send emails through the EmailComposer class.

Example

<?php
$ec = new EmailComposer($this->site);

$ec->setFrom($this->user); // User object, optional
$ec->setTo($u); // User object

$ec->setSubject(l('A translatable subject'));
$ec->setContent('Some <b>HTML</b> Here');

$ec->send();