exchange2010 php

  • Creatore Discussione Creatore Discussione marley
  • Data di inizio Data di inizio

marley

Nuovo Utente
7 Giu 2011
2
0
0
Salve, sto utilizzando una classe ricavata dal sito https://github.com/rileydutton/exchange-web-services-for-php/ per inviare email utilizzando il server echange.
Fin qui tutto bene; putroppo però la funzione non prevede l'invio email con allegato. Ho cercato di seguire lo schema di microsoft in questo modo:

Codice:
$CreateItem->Items->Message->ItemClass = "IPM.Note";
		$CreateItem->Items->Message->Subject = $subject;
		$CreateItem->Items->Message->Body->BodyType = $bodytype;
		$CreateItem->Items->Message->Body->_ = $content.$attach['ContentId'];
		$CreateItem->Items->Message->ToRecipients->Mailbox->EmailAddress = $to;
		
		if($attach){      //$CreateItem->Items->Message->Attachments->FileAttachment->AttachmentId->Id = $attach['AttachmentId'];
        //$CreateItem->Items->Message->Attachments->FileAttachment->Name = $attach['Name'];
        //$CreateItem->Items->Message->Attachments->FileAttachment->ContentType = $attach['ContentType'];
        $CreateItem->Items->Message->Attachments->FileAttachment->ContentId = $attach['ContentId'];
        $CreateItem->Items->Message->Attachments->FileAttachment->Content = $attach['ContentId'];
        $CreateItem->Items->Message->Attachments->FileAttachment->Size = $attach['Size'];            
    }
    
		if($markasread)
			$CreateItem->Items->Message->IsRead = "true";
		
		$response = $this->client->CreateItem($CreateItem);

e il risultato è questo errore:
PHP Fatal error: Uncaught SoapFault exception: [a:ErrorIncorrectSchemaVersion] The request is valid but does not specify the correct server version in the RequestServerVersion SOAP header. Ensure that the RequestServerVersion SOAP header is set with the correct RequestServerVersionValue. in......

Suggerimenti? Grazie.
 

Discussioni simili