How to use the flag / authuser of the PHP imap_open () function?

-1
imap_open("{".HOST.":143/[email protected]/novalidate-cert}INBOX", $email , $pass);

The above line is illustrative, I am here to help you use these parameters correctly.

I'll explain what I need to do.

I need to access the zimbra mailbox, access one user at a time, and move the emails from the SPAM folder to another. My problem is how to make this connection to each account, so I saw the imap function of php does not select bulk accounts for this task.

Thanks in advance for your help!

    
asked by anonymous 29.03.2017 / 21:50

1 answer

0

As I have not had answers, searching for a solution relentlessly found. The correct syntax for accessing sub-accounts through zimbra admin:

  • user = test // user to be want access
  • authuser = admin // administrator zimbra
  • $ email // admin email zimbra
  • $ pass // zimbra administrator password

imap_open ("{" .HOST. ": 143/[email protected]/authuser=admin/novalidate-cert}INBOX", $ email, $ pass);

In this way I can access any mailbox registered in zimbra and make the necessary changes.

    
30.03.2017 / 20:20