PHP code example of taitava / silverstripe-sentemails
1. Go to this page and download the library: Download taitava/silverstripe-sentemails library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
taitava / silverstripe-sentemails example snippets
use SilverStripe\Core\Extension;
class MyImapSentFolderFactoryExtension extends Extension
{
public function onBeforeSaveEmailMessage(Swift_Mime_Message $email_message)
{
// ... Inspect the $email_message instance ...
// ... Decide not to save this message ...
return false;
// ... Decide to accept saving the message ...
return true;
// ... If you do not write a 'return' statement or if you return null, saving is also accepted ...
return;
}
}