Skip to content

Instantly share code, notes, and snippets.

@alanfluff
Created September 20, 2017 18:59
Show Gist options
  • Save alanfluff/95a49be190bc70ac25ee19442ecf92a2 to your computer and use it in GitHub Desktop.
Save alanfluff/95a49be190bc70ac25ee19442ecf92a2 to your computer and use it in GitHub Desktop.
Append Subject in outgoing emails - eg date time stamp
<?php
// /site/ready.php
// Email subjects - add a datestamp to email subjects
$forms->addHookBefore('FormBuilderProcessor::emailForm', function($event) {
$processor = $event->object;
$formData = $event->arguments(1); // associative array of form data, if needed
$processor->emailSubject = $processor->emailSubject . " (" . date('Y/m/d H:i:s') . ")";
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment