<?php
// Diagnostic — delete after use
header('Content-Type: text/plain');
echo 'PHP: ' . PHP_VERSION . "\n";
echo 'imap_open exists:        ' . (function_exists('imap_open') ? 'YES' : 'NO') . "\n";
echo 'imap_utf7_encode exists: ' . (function_exists('imap_utf7_encode') ? 'YES' : 'NO') . "\n";
echo 'imap_mime_header_decode: ' . (function_exists('imap_mime_header_decode') ? 'YES' : 'NO') . "\n";
echo 'mb_convert_encoding:     ' . (function_exists('mb_convert_encoding') ? 'YES' : 'NO') . "\n";
echo 'openssl loaded:          ' . (extension_loaded('openssl') ? 'YES' : 'NO') . "\n";
echo 'OP_HALFOPEN constant:    ' . (defined('OP_HALFOPEN') ? 'YES (' . OP_HALFOPEN . ')' : 'NO') . "\n";
echo "\n";
echo 'IMAP extension loaded as: ' . (extension_loaded('imap') ? 'imap' : 'NOT LOADED') . "\n";
echo "\nAll loaded extensions:\n" . implode(', ', get_loaded_extensions()) . "\n";