- Code: Select all
function afterInsert(&$record){
/**
* Trigger that is called after Course record is inserted.
* @param $record Dataface_Record object that has just been inserted.
*/
$response =& Dataface_Application::getResponse();
// get reference to response array
if ( mail('jason@mail.com', 'Record Update-Infinity', 'A Workorder has been entered.') ){
$response['--msg'] .= "\nEmail sent to jason@mail.com successfully.";
} else {
$response['--msg'] .= "\nMail could not be sent at this time.";
}
}
I only get the Mail could not be sent at this time message. Is this automatically accessible or do I have to load the email module?
TIA
Jason