Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

Cannot delete gmail mail using IMAP

please help i try to delete 1 mail from my gmail using IMAP but my code seem not working

PHP Code

<?php

$mbox 
= imap_open("{imap.gmail.com:993/ssl}[Gmail]/INBOX", "[email protected]", "dick")
    or die(
"Can't connect: " . imap_last_error());

imap_mail_move($mbox,1,"[Gmail]/Trash"); 
imap_expunge($mbox);

imap_close($mbox);
?>


solved
must use {imap.gmail.com:993/imap/ssl}INBOX and imap_mail_move($mbox,"1",'[Gmail]/Trash');
but a new problem is it's deleted twice #sad :(


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Javascript]  by TrojanJun 29, 2022 08:52 AM 1 206 Jun 29, 2022 08:52 AM
Last Post: Empty Throne
[PHP] by Professional HackerJan 26, 2022 08:01 PM 2 144 Jan 26, 2022 08:01 PM
Last Post: Professional Hacker
[Javascript]  by smtpzJul 31, 2020 06:41 AM 2 112 Jul 31, 2020 06:41 AM
Last Post: smtpz