The message object contains information about a single message, for example, it can be a single email imported from your inbox or a message sent using submit ticket form.
$message = new Wphd_Model_Message(100);
echo $message->exists() . PHP_EOL;
echo $message->title . PHP_EOL;
Properties
id– (int) unique number assigned to the messagesource– (int) how the ticket was received – 1: email import, 2: submit ticket form (private), 3: submit ticket form (public)thread_id– (int) ID of the thread to which the message belongs touser_id– (int) ID of a user who submitted the messageagent_id– (int) ID of an agent who submitted the message or NULL if the message was not sent by the agenttype– (int) message type, one of 1: received,2: note, 3: draft, 4: sent,5: private, 6: trashedmessage_id– (string) uniquely generated message idcreated_at– (date) date when the message was createdtitle– (string) message titlefrom_name– (string) sender namefrom_email– (string) sender emailto_name– (string) receiver nameto_email– (string) receiver emailbody_text– (string) message content in plain text formatbody_html– (string) message content in HTML format
Methods
delete()– deletes message from DBexists()– checks if message existssave()– saves message data in DBtoArray()– returns all information about the message in an associative array