Comments (5)
Will get around to this today or tomorrow
from php-ews.
You could also do it as just one giant array, but I dislike that. Here's how you would do that
<?php
use jamesiarmes\PEWS\Contacts\ContactsAPI as API;
use jamesiarmes\PEWS\API\Type;
$api = API::withUsernameAndPassword('server', 'username', 'password');
$contact = $api->getContacts()[0];
$api->getClient()->CreateAttachment(array(
'ParentItemId' => $contact->getItemId()->toArray(),
'Attachments' => array('FileAttachment' => array(
'Name' => 'Avatar',
'Content' => file_get_contents("./github.png"),
'ContentType' => 'image/png',
'IsContactPhoto' => true
))
));
But honestly, I want to be moving away from doing everything in arrays. In the future, In the next release, I'll be making an $api->createAttachment($itemId, $attachment)
function, but I don't have an ETA on that
from php-ews.
Do you have an idea on when this will be implemented?
from php-ews.
Sorry for the delay, I've been sick lately. Here's the documentation on how to do it
from php-ews.
I hope you get better soon. Thank you very much!
from php-ews.
Related Issues (20)
- Authorization stopped working suddenly HOT 1
- looks like we got no XML document
- Upgrade from jamesiarmes -> garethp php-ews HOT 1
- Create a contact
- internetMessageHeaders HOT 1
- BUG FreeBusyResponse array HOT 1
- toRecipients getting null values for inplace archive mails
- Update Mail Item -> Categorize Email HOT 1
- PHP 8.2 - Deprecated dynamic properties HOT 5
- Oauth is not working with Exchange 2013
- Issue with using toRecipients property in EWS restriction HOT 2
- Daylight Savings
- How to get medias appointment
- Update contact with ExtendedProperty
- Exceptions
- Set a calendar event with custom identifier, so that I can (later on) GET an event by the same identifier HOT 3
- Change "busy" status for event. HOT 2
- Checking if an item exists (by $itemId and $changeKey) results in FATAL ERROR if the object is not found - How to handle this? HOT 1
- Also delete recurring events when master event is deleted? HOT 1
- getLegacyFreeBusyStatus() does not return WorkingElsewhere HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-ews.