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

How to add body to event? #32

Open
igittigitt opened this issue Nov 12, 2018 · 2 comments
Open

How to add body to event? #32

igittigitt opened this issue Nov 12, 2018 · 2 comments

Comments

@igittigitt
Copy link

igittigitt commented Nov 12, 2018

I'd like to create an event containing a body information as plain text or HTML. So i tried to extend the ExchangeClient function create_event() with:

$body = 'Hello World! This is a cool event :-)';
$CreateItem->Items->CalendarItem->Body = new StdClass();
$CreateItem->Items->CalendarItem->Body = $body;
$CreateItem->Items->CalendarItem->Body->BodyType = 'Text';

Therefore the resulting XML in the SOAP-request should look like this:
<t:Body BodyType="Text">Hello World! This is a cool event :-)</t:Body>

But no luck so far. I don't get what to assign to the body-object which contain the bodytext.

@igittigitt
Copy link
Author

igittigitt commented Nov 12, 2018

Uh, just found out by investigating the send_message function. I had to do it with "->_" (underscore):
$CreateItem->Items->CalendarItem->Body->_ = $body;

Now, it works like a charm! :-)

@UserNeo
Copy link

UserNeo commented Mar 5, 2019

Thank you?
Do you have a tip for reading the body at an existing appointment?

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