Quick question on email function [SOLVED]
Posted: Wed Apr 28, 2010 7:09 pm
Quick question on the email functions. I setup an afterInsert as per the Triggers Wiki using the following code:
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
- 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