Jan 6, 2014 06:48 PM
(This post was last modified: Jan 7, 2014 04:13 PM by n31ght0.)
please help i try to delete 1 mail from my gmail using IMAP but my code seem not working
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 :(
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 :(

