Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The request failed schema validation: The element 'From' in namespace #59

Closed
icaroce opened this issue Sep 5, 2016 · 2 comments
Closed

Comments

@icaroce
Copy link

icaroce commented Sep 5, 2016

When set 'setFrom' occurs the error

SoapFault in NTLMSoapClient.php line 122:
The request failed schema validation: The element 'From' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types' has incomplete content. List of possible elements expected: 'Mailbox' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types'.

in NTLMSoapClient.php line 122
at SoapClient->__call('CreateItem', array(object(Type))) in NTLMSoapClient.php line 122
at NTLMSoapClient->__call('CreateItem', array(object(Type))) in MiddlewareFactory.php line 18
at ExchangeWebServices->garethp\ews\API\ExchangeWebServices{closure}(object(MiddlewareRequest), object(Closure)) in ExchangeWebServices.php line 498
at ExchangeWebServices->garethp\ews\API{closure}(object(MiddlewareRequest)) in MiddlewareFactory.php line 32
at ExchangeWebServices->garethp\ews\API\ExchangeWebServices{closure}(object(MiddlewareRequest), object(Closure)) in ExchangeWebServices.php line 498
at ExchangeWebServices->garethp\ews\API{closure}(object(MiddlewareRequest)) in MiddlewareFactory.php line 48
at ExchangeWebServices->garethp\ews\API\ExchangeWebServices{closure}(object(MiddlewareRequest), object(Closure)) in ExchangeWebServices.php line 498
at ExchangeWebServices->garethp\ews\API{closure}(object(MiddlewareRequest)) in MiddlewareFactory.php line 55
at ExchangeWebServices->garethp\ews\API\ExchangeWebServices{closure}(object(MiddlewareRequest), object(Closure)) in ExchangeWebServices.php line 498
at ExchangeWebServices->garethp\ews\API{closure}(object(MiddlewareRequest)) in MiddlewareFactory.php line 66
at ExchangeWebServices->garethp\ews\API\ExchangeWebServices{closure}(object(MiddlewareRequest), object(Closure)) in ExchangeWebServices.php line 498

@Garethp
Copy link
Owner

Garethp commented Sep 5, 2016

What does your code look like?

@icaroce
Copy link
Author

icaroce commented Sep 5, 2016

Sorry. My fault.
I was trying setFrom('johndoe@teste.com');

I got as follows

$mailbox = new Type\EmailAddressType();
$mailbox->setEmailAddress('escala.voo@....com.br');

$re = new Type\SingleRecipientType();
$re->setMailbox($mailbox);
$message->setFrom($re);

@icaroce icaroce closed this as completed Sep 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants