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

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
Post Reply
brtk
Posts: 16
Joined: Fri Jul 12, 2019 12:45 pm
Location: Toronto
Contact:

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

Post 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 ?
Post Reply