add multiple sources in account existant

38 Views Asked by At

how to add multiple sources in account existant .. for example I create account [email protected] but I have add source [email protected] in this account ?, how I try this ... now when i get mail for account [email protected] and source [email protected] .. that is to say to get emails for two [email protected] and [email protected]

i try with this code :

        public function contextAction()
        {
            $contextio = new ContextIO('key', 'secret');
            $s = $contextio->addEmailAccount($this->getUser()->getidContext(),array('server' => 'imap.googlemail.com','username' =>'[email protected]'));
            if($s === false) print_r($contextio->getLastResponse());
            print_r($s->getData());

        }

but I have this output:

ContextIOResponse Object
    (
        [headers:protected] => Array
            (
                [request] => 
                [response] => 
            )

        [rawResponseHeaders:protected] => 
        [rawRequestHeaders:protected] => 
        [rawResponse:protected] => {"success":false,"feedback_code":"An email account for this user already exists"}
        [decodedResponse:protected] => Array
            (
                [success] => 
                [feedback_code] => An email account for this user already exists
            )

        [httpCode:protected] => 500
        [contentType:protected] => application/json
        [hasError:protected] => 1
    )
0

There are 0 best solutions below