amirsanni / php-ews-wrapper Goto Github PK
View Code? Open in Web Editor NEWA simple wrapper for jamesiarmes/php-ews library
License: MIT License
A simple wrapper for jamesiarmes/php-ews library
License: MIT License
Hi,
looks like there's an issue with tasks. It searches for tasks but tries to return contacts.
To solve this, the get function in this file should be sth like:
`public function get(int $page_number=1){
$response = $this->folder->getItems($page_number, DistinguishedFolderIdNameType::TASKS, $this->limit);
$res = new \stdClass();
if($response[0]->ResponseClass == ResponseClassType::SUCCESS){
//format the response by returning specific fields
$retrieved_tasks = $response[0]->RootFolder->Items->Task;
$res->tasks = $retrieved_tasks;
$res->status = 1;
}
else{
$res->msg = $response[0]->ResponseCode.": ".$response[0]->MessageText;
$res->status = 0;
}
return $res;
}`
instead of
` $response = $this->folder->getItems($page_number, DistinguishedFolderIdNameType::TASKS, $this->limit);
$res = new \stdClass();
if($response[0]->ResponseClass == ResponseClassType::SUCCESS){
//format the response by returning specific fields
$retrieved_contacts = $response[0]->RootFolder->Items->Contact;
$res->contacts = $retrieved_contacts;
$res->status = 1;
}
else{
$res->msg = $response[0]->ResponseCode.": ".$response[0]->MessageText;
$res->status = 0;
}
return $res;`
php-ews-wrapper/src/Messages/Message.php
Line 363 in 53f69fb
There is no properly documented way to retrieve attachments from emails.
The library returns only the name of the attachments without other details. This makes it difficult to retrieve the attachments of an email.
To fix this I modified the referenced line 363 to return the raw attachments as shown below.
$det->attachments = $msg_info->Attachments && $msg_info->Attachments->FileAttachment ? $msg_info->Attachments->FileAttachment : "";
Then other parts of the code that need it manipulate the code as needed with the knowledge of the underlying php-ews to retrieve attachments from email and save them.
Hi,
currently not all from EWS provided details of messages are returned. E.g. the flag property contains some details like "due date". It would be nice to have this implemented. Alternatively maybe it makes sense to attach all message details to returned object in Message.php
Maybe like this?
$det->details = $msg_info
Hi there!
Is it possible to forward an incoming email to another email address? How can i do this?
This was working properly up until this month October.
When it tries to connect to outlook.office365.com, I get the following error:
debug.INFO: array (
'function' => 'processEmailTickets: ews->mail->unread',
'message' => 'SOAP client returned status of 401.',
)
My username and password are correct as I have tested this on a web browser.
It was working fine until October, but a new security measure seems to have arrived. What should we do?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.