protected function SmtpUnitTest::getLatestMaillogEntry in SMTP Authentication Support 7
Same name and namespace in other branches
- 7.2 tests/smtp.unit.test \SmtpUnitTest::getLatestMaillogEntry()
Gets the latest Maillog entry.
Return value
array Maillog entry.
1 call to SmtpUnitTest::getLatestMaillogEntry()
- SmtpUnitTest::testLogging in tests/
smtp.unit.test - Tests logging mail with maillog module.
File
- tests/
smtp.unit.test, line 241 - Some tests for the SMTP module.
Class
- SmtpUnitTest
- @file Some tests for the SMTP module.
Code
protected function getLatestMaillogEntry() {
$query = 'SELECT id, header_from, header_to, header_reply_to, header_all, subject, body FROM {maillog} ORDER BY id DESC';
$result = db_query_range($query, 0, 1);
if ($maillog = $result
->fetchAssoc()) {
// Unserialize values.
$maillog['header_all'] = unserialize($maillog['header_all']);
}
return $maillog;
}