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.
brtk
Posts: 14
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.

Postby brtk » Wed Sep 04, 2019 7:28 pm

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 ?


Return to “Developers”

Who is online

Users browsing this forum: No registered users and 3 guests