You are here

function maillog_maillog_load in Maillog / Mail Developer 6

Same name and namespace in other branches
  1. 7 maillog.module \maillog_maillog_load()

File

./maillog.module, line 88
Provides a 'maillog' node type

Code

function maillog_maillog_load($idmaillog) {
  $result = db_query("SELECT idmaillog, header_from, header_to, header_reply_to, header_all, subject, body FROM {maillog} WHERE idmaillog = '%d'", $idmaillog);
  if ($result == FALSE) {
    $maillog = NULL;
  }
  else {
    $maillog = db_fetch_array($result);

    // unserialize values
    $maillog['header_all'] = unserialize($maillog['header_all']);
  }
  return $maillog;
}