Panduan ini akan memberikan contoh script tarik email menggunakan script PHP.
<?php $mbox = imap_open("{xxx.rumahweb.org:995/pop3/ssl/novalidate-cert}", "[email protected]", "qwe123123"); $mc = imap_check($mbox); $result = imap_fetch_overview($mbox,"1:{$mc->Nmsgs}",0); echo "<pre>"; foreach ($result as $overview) { $seen_msg = $overview->seen; if (!$seen_msg) { echo "</pre><pre>"; echo "Tanggal :"."{$overview->date}"."<br />"; echo "From: {$overview->from}"."<br />"; echo "Subyek Email: {$overview->subject}"."<br />"; echo "UID: {$overview->uid}"."<br />"; echo "Seen: {$overview->seen}"."<br />"; $msgbody = imap_fetchbody($mbox,$overview->msgno,1)."<br />"; echo "Message: $msgbody"; echo "</pre>"; echo "<br />"; } } echo ""; imap_close($mbox); ?>
Silahkan dari script ini bisa anda explorasi lebih jauh.