Page 1 of 1

I need forward email1 to email2 thrue Zimbra Api. I use “zimbra-api” library – composer php project.

Posted: Wed Sep 04, 2019 7:28 pm
by brtk
Implementation:

$apiMail = AccountFactory::instance($host, $format);
$account = new AccountSelector(AccountBy::NAME(), $email1);
$apiMail->auth($account, $pass);//account as admin
$prefclass = new Pref("+zimbraPrefMailForwardingAddress", $email2);
$pref = $apiMail->modifyPrefs([$prefclass2]);

I don’t have any errors on running, but forwarding not working.

Any ideas ?