PHP
PHP
IMAP NOOP Command
Demonstrates how to send an IMAP NOOP command using SendRawCommand.Chilkat PHP Downloads
<?php
use Chilkat2\Imap;
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
$imap = new Imap();
// Connect to an IMAP server.
// Use TLS
$imap->Ssl = true;
$imap->Port = 993;
try {
$imap->Connect('imap.example.com');
// Login
$imap->Login('****', '****');
} catch (\Chilkat2\Exception $e) {
echo $e->getMessage(), "\n";
exit;
}
// Send a NOOP command
$resp = $imap->SendRawCommand('NOOP');
echo $resp, "\n";
// Disconnect from the IMAP server.
$imap->Disconnect();