api-php-lib icon indicating copy to clipboard operation
api-php-lib copied to clipboard

Mail forwarding

Open xsme opened this issue 8 years ago • 0 comments

It's some feature to add forwarding when api creates email address, or update it later?

At the moment I edit some your class, and it looks like this:

    /**
     * ...
     * @param string $address
     */
    public function create($name, $siteId, $mailbox = false, $address, $password = '')
    {
        $packet = $this->_client->getPacket(); 

        ...

        if (!empty($address)) {
            $forwarding = $mailname->addChild('forwarding');
            $forwarding->addChild('enabled', 'true');
            $forwarding->addChild('address', $address);
        }

        ...

        $response = $this->_client->request($packet);
        return new Struct\Info($response->mailname);
    }

But in time, my solution is weak. Maybe someone have any alternative option?

xsme avatar Feb 17 '17 12:02 xsme