I can't used php by imap_open for get all message in mail account from vesta cp
Posted: Thu Sep 01, 2022 9:08 pm
I can't used php for get all message in mail account from vesta cp
I used to php for get all massage in mail account as json from vesta cp but don't work it. How can I fix it ?
by imap_open
Notice: Unknown: Can't connect to sev.cordrr.tk,143: Timed out (errflg=2) in Unknown on line 0
I used to php for get all massage in mail account as json from vesta cp but don't work it. How can I fix it ?
by imap_open
Code: Select all
<?php
$imap = imap_open("{cordrr.tk:143/imap/tls}INBOX", "[email protected]", "admin");
$headers = imap_headers($imap);
if (!$headers) {
print "Failed to retrieve headers\n";
} else {
foreach($headers as $header) {
print "$header\n";
}
}
imap_close($imap);
?>