A
A
$imapPath = '{mail.domain.com:143/novalidate-cert}INBOX';
// Çöp kutusu $imapPath = '{mail.domain.com:143/novalidate-cert}INBOX.Trash';
// Özel Dizin $imapPath = '{mail.domain.com:143/novalidate-cert}INBOX.dizinAdi';
$username = 'USERNAME';
$password = 'PASSWORD';
// try to connect
$inbox = imap_open($imapPath,$username,$password) or die('Cannot connect to Gmail: ' . imap_last_error());
// okunmamış mailler
$mailList = imap_search($inbox,'UNSEEN');
foreach($mailList as $mail){
$headerInfo = imap_headerinfo($inbox,$mail);
// Mail içeriği
print_r($headerInfo);
}