Comments (31)
Try something like this
use jamesiarmes\PEWS\API;
$api = API::withUsernameAndPassword('server', 'username', 'password');
$calendar = $api->getCalendar();
$start = new DateTime('8:00 AM');
$end = new DateTime('9:00 AM');
$createdItemIds = $calendar->createCalendarItems(array(
'Subject' => 'Test',
'Start' => $start->format('c'),
'End' => $end->format('c'),
'RequiredAttendees' => array(
array(
'Mailbox' => array(
'Name' => 'Persons Name',
'EmailAddress' => 'Persons Email Address'
)
)
)
));
I just added a RequiredAttendees data to the createCalendarItem example
from php-ews.
Yes, you need to add him as a attendee as well as yourself
$createdItemIds = $calendar->createCalendarItems(array(
'Subject' => 'Test',
'Start' => $start->format('c'),
'End' => $end->format('c'),
'RequiredAttendees' => array(
array(
'Mailbox' => array(
'Name' => 'Erick Engelke',
'EmailAddress' => '[email protected]'
)
),
array(
'Mailbox' => array(
'Name' => 'The Other Person',
'EmailAddress' => 'Their Email Address'
)
)
)
));
That should be about right
from php-ews.
That works perfectly, THANKS!!!!!
Erick
On Mon, Mar 14, 2016 at 5:58 AM, Garethp [email protected] wrote:
I'm not sure why you're not getting an email, but I think I can see why
your example to add multiple people didn't work. You did it like this'RequiredAttendees' => array( array( 'Mailbox' => array( 'Name' => 'Erick Engelke', 'EmailAddress' => '[email protected]', ), 'Mailbox' => array( 'Name' => 'engcompc', 'EmailAddress' => '[email protected]', ) )
When you needed to do it like this
'RequiredAttendees' => array( array( 'Mailbox' => array( 'Name' => 'Erick Engelke', 'EmailAddress' => '[email protected]', ), ), array( 'Mailbox' => array( 'Name' => 'engcompc', 'EmailAddress' => '[email protected]', ) )
See, the difference is that you had both Mailbox keys in the same array.
In PHP, you declare a key twice. They both need to be their own array. I
ran a test myself, and this worked for me to add multiple people to an event$start = new DateTime('8:01 AM');$end = new DateTime('9:00 AM');$createdItemIds = $calendar->createCalendarItems(array( 'Subject' => 'Test', 'Start' => $start->format('c'), 'End' => $end->format('c'), 'RequiredAttendees' => array( array( 'Mailbox' => array( 'Name' => 'Person 1', 'EmailAddress' => '[email protected]', ) ), array ( 'Mailbox' => array( 'Name' => 'Person 2', 'EmailAddress' => '[email protected]' ) ) )), array('SendMeetingInvitations' => 'SendOnlyToAll'));
If you want to see the raw API response, you need to be using a debug
environment capable of inserting break points in to your code. If you have
that, you can put a break point in ExchangeWebServices.php on line 321 to
see the response before it's processed—
Reply to this email directly or view it on GitHub
#10 (comment).
from php-ews.
Also, from what I've gathered, recipients will receive emails but the person who created the event won't receive one
from php-ews.
Hi. Do you mean inviting them to a preexisting event or inviting them when you create the event?
from php-ews.
Inviting them when I create the event.
from php-ews.
thanks, I will try that
On Mon, Feb 22, 2016 at 4:18 AM, Garethp [email protected] wrote:
Hi. Do you mean inviting them to a preexisting event or inviting them when
you create the event?—
Reply to this email directly or view it on GitHub
#10 (comment).
from php-ews.
Did this work for you?
from php-ews.
Hey @erickengelke, can you let me know how this went for you?
from php-ews.
I'm closing this from non-response. If you still have an issue, let me know
from php-ews.
Sorry, I was away for a few weeks.
I have not been able to figure out how to use your libraries. This namespace and use is new to me, and hours later I still haven't figured it out. You must have other lines or command line switches or something to somehow indicate these files are used. But I don't see any examples that work for me. I'm using PHP 5.6.16
from php-ews.
Hi Erik, do you know how to use Composer? Have you installed this through Composer?
from php-ews.
No, I didn't know about Composer - I take it that is the missing piece. I
just downloaded the libs/examples through GitHup. I will look into
Composer right now.
On Wed, Mar 9, 2016 at 4:28 AM, Garethp [email protected] wrote:
Hi Erik, do you know how to use Composer? Have you installed this through
Composer?—
Reply to this email directly or view it on GitHub
#10 (comment).
from php-ews.
Okay, I install and run composer. It adds the following
-rw-r--r-- 1 root erick 62624 Mar 9 09:28 composer.lock
-rwxr--r-- 1 erick erick 939 Mar 8 12:47 phpunit.live.xml
-rwxr--r-- 1 erick erick 941 Mar 8 12:47 phpunit.record.xml
drwxr-xr-x 17 root erick 512 Mar 9 09:28 vendor
But I still don't understand how to run the examples without getting
PHP Fatal error: Class 'jamesiarmes\PEWS\API' not found in
/usr/home/erick/ews/jamesiarmes/jamesiarmes/PEWS/examples/calendar/createItem.php
on line 5
On Wed, Mar 9, 2016 at 9:21 AM, Erick Engelke [email protected]
wrote:
No, I didn't know about Composer - I take it that is the missing piece. I
just downloaded the libs/examples through GitHup. I will look into
Composer right now.On Wed, Mar 9, 2016 at 4:28 AM, Garethp [email protected] wrote:
Hi Erik, do you know how to use Composer? Have you installed this through
Composer?—
Reply to this email directly or view it on GitHub
#10 (comment).
from php-ews.
your instructions say "composer require garethp/php-ews
so I do:
php ../../composer.phar require garethp/php-ews
Using version ^0.7.4 for garethp/php-ews
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package garethp/php-ews No version set (parsed as
1.0.0) could not be found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to
your minimum-stability setting
see https://getcomposer.org/doc/04-schema.md#minimum-stability for
more details.
Read https://getcomposer.org/doc/articles/troubleshooting.md for further
common problems.
Installation failed, reverting ./composer.json to its original content.
root@dark:/home/erick/ews/jamesiarmes/PEWS #
On Wed, Mar 9, 2016 at 9:37 AM, Erick Engelke [email protected]
wrote:
Okay, I install and run composer. It adds the following
-rw-r--r-- 1 root erick 62624 Mar 9 09:28 composer.lock
-rwxr--r-- 1 erick erick 939 Mar 8 12:47 phpunit.live.xml
-rwxr--r-- 1 erick erick 941 Mar 8 12:47 phpunit.record.xml
drwxr-xr-x 17 root erick 512 Mar 9 09:28 vendorBut I still don't understand how to run the examples without getting
PHP Fatal error: Class 'jamesiarmes\PEWS\API' not found in
/usr/home/erick/ews/jamesiarmes/jamesiarmes/PEWS/examples/calendar/createItem.php
on line 5On Wed, Mar 9, 2016 at 9:21 AM, Erick Engelke [email protected]
wrote:No, I didn't know about Composer - I take it that is the missing piece.
I just downloaded the libs/examples through GitHup. I will look into
Composer right now.On Wed, Mar 9, 2016 at 4:28 AM, Garethp [email protected] wrote:
Hi Erik, do you know how to use Composer? Have you installed this
through Composer?—
Reply to this email directly or view it on GitHub
#10 (comment).
from php-ews.
What does your composer.json look like?
from php-ews.
This is what happened when I tried to composer require my package in a new directory
composer require garethp/php-ews
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Using version ^0.7.4 for garethp/php-ews
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing guzzlehttp/promises (1.1.0)
Loading from cache
- Installing psr/http-message (1.0)
Loading from cache
- Installing guzzlehttp/psr7 (1.2.3)
Loading from cache
- Installing guzzlehttp/guzzle (6.1.1)
Loading from cache
- Installing garethp/php-ews (v0.7.4)
Downloading: 100%
Writing lock file
Generating autoload files
from php-ews.
I've downloaded it fresh to a new subdirectory:
using the composer.json that you distribute unchanged
$ php ../../composer.phar require garethp/php-ews
Using version ^0.7.4 for garethp/php-ews
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package garethp/php-ews No version set (parsed as
1.0.0) could not be found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to
your minimum-stability setting
see https://getcomposer.org/doc/04-schema.md#minimum-stability for
more details.
Read https://getcomposer.org/doc/articles/troubleshooting.md for further
common problems.
Installation failed, reverting ./composer.json to its original content.
On Wed, Mar 9, 2016 at 12:15 PM, Garethp [email protected] wrote:
This is what happened when I tried to composer require my package in a new
directorycomposer require garethp/php-ews
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Using version ^0.7.4 for garethp/php-ews
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing guzzlehttp/promises (1.1.0)
Loading from cache- Installing psr/http-message (1.0)
Loading from cache- Installing guzzlehttp/psr7 (1.2.3)
Loading from cache- Installing guzzlehttp/guzzle (6.1.1)
Loading from cache- Installing garethp/php-ews (v0.7.4)
Downloading: 100%Writing lock file
Generating autoload files—
Reply to this email directly or view it on GitHub
#10 (comment).
from php-ews.
I've replicated your environment, but I get stuck where I show above. Does
it have to be in some specific subdirectory?
On Wed, Mar 9, 2016 at 3:59 PM, Erick Engelke [email protected]
wrote:
I've downloaded it fresh to a new subdirectory:
using the composer.json that you distribute unchanged$ php ../../composer.phar require garethp/php-ews
Using version ^0.7.4 for garethp/php-ews
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.Problem 1
- The requested package garethp/php-ews No version set (parsed as
1.0.0) could not be found.Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to
your minimum-stability setting
see https://getcomposer.org/doc/04-schema.md#minimum-stability for
more details.Read https://getcomposer.org/doc/articles/troubleshooting.md for
further common problems.Installation failed, reverting ./composer.json to its original content.
On Wed, Mar 9, 2016 at 12:15 PM, Garethp [email protected] wrote:
This is what happened when I tried to composer require my package in a
new directorycomposer require garethp/php-ews
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Using version ^0.7.4 for garethp/php-ews
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing guzzlehttp/promises (1.1.0)
Loading from cache- Installing psr/http-message (1.0)
Loading from cache- Installing guzzlehttp/psr7 (1.2.3)
Loading from cache- Installing guzzlehttp/guzzle (6.1.1)
Loading from cache- Installing garethp/php-ews (v0.7.4)
Downloading: 100%Writing lock file
Generating autoload files—
Reply to this email directly or view it on GitHub
#10 (comment).
from php-ews.
Okay, I've figured out how to install.
My json is
{
"require": {
"garethp/php-ews": "dev-master"
}
}
How do I run a php program with it?
On Wed, Mar 9, 2016 at 9:14 PM, Erick Engelke [email protected]
wrote:
I've replicated your environment, but I get stuck where I show above.
Does it have to be in some specific subdirectory?On Wed, Mar 9, 2016 at 3:59 PM, Erick Engelke [email protected]
wrote:I've downloaded it fresh to a new subdirectory:
using the composer.json that you distribute unchanged$ php ../../composer.phar require garethp/php-ews
Using version ^0.7.4 for garethp/php-ews
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.Problem 1
- The requested package garethp/php-ews No version set (parsed as
1.0.0) could not be found.Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to
your minimum-stability setting
see https://getcomposer.org/doc/04-schema.md#minimum-stability for
more details.Read https://getcomposer.org/doc/articles/troubleshooting.md for
further common problems.Installation failed, reverting ./composer.json to its original content.
On Wed, Mar 9, 2016 at 12:15 PM, Garethp [email protected]
wrote:This is what happened when I tried to composer require my package in a
new directorycomposer require garethp/php-ews
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Using version ^0.7.4 for garethp/php-ews
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing guzzlehttp/promises (1.1.0)
Loading from cache- Installing psr/http-message (1.0)
Loading from cache- Installing guzzlehttp/psr7 (1.2.3)
Loading from cache- Installing guzzlehttp/guzzle (6.1.1)
Loading from cache- Installing garethp/php-ews (v0.7.4)
Downloading: 100%Writing lock file
Generating autoload files—
Reply to this email directly or view it on GitHub
#10 (comment).
from php-ews.
Change it to
{
"require": {
"garethp/php-ews": "^0.7.4"
}
}
Then delete your composer.lock
file and try running composer install
from php-ews.
Okay, got it to run!!!!
It adds to my calendar, but not to the other person's... which is my final
goal.
Erick
On Thu, Mar 10, 2016 at 4:10 AM, Garethp [email protected] wrote:
Change it to
{
"require": {
"garethp/php-ews": "^0.7.4"
}
}Then delete your composer.lock file and try running composer install
—
Reply to this email directly or view it on GitHub
#10 (comment).
from php-ews.
I'm logging in as engcompc, which will be my calendar robot account, and
trying to add Erick, which is the other person. T
he event does get scheduled for engcompc successfully, but not for Erick,
who is the other person. Also, no Email is sent, might that be the problem?
I've tried adding RoutingType='SMTP', and a variety of other things, but it
never sends a message to Erick.
BTW, using OutlookWebConnect, I verified that engcompc is privileged enough
to create a tentative calendar event for Erick, so that's not my problem.
Erick
On Thu, Mar 10, 2016 at 7:00 AM, Garethp [email protected] wrote:
Yes, you need to add him as a attendee as well as yourself
$createdItemIds = $calendar->createCalendarItems(array( 'Subject' => 'Test', 'Start' => $start->format('c'), 'End' => $end->format('c'), 'RequiredAttendees' => array( array( 'Mailbox' => array( 'Name' => 'Erick Engelke', 'EmailAddress' => '[email protected]' ) ), array( 'Mailbox' => array( 'Name' => 'The Other Person', 'EmailAddress' => 'Their Email Address' ) ) )));
That should be about right
—
Reply to this email directly or view it on GitHub
#10 (comment).
from php-ews.
If you want to send an email out, you need to add that as an option when creating. Like this
$calendar->createCalendarItems($stuff, array(
'SendMeetingInvitations' => 'SendOnlyToAll'
));
Try that, let me know how it goes
from php-ews.
No luck, it never sends the Email. I looked at the returned variable with
print_r, there is no error message.
Erick
On Thu, Mar 10, 2016 at 7:21 AM, Garethp [email protected] wrote:
If you want to send an email out, you need to add that as an option when
creating. Like this$calendar->createCalendarItems($stuff, array( 'SendMeetingInvitations' => 'SendOnlyToAll'));
Try that, let me know how it goes
—
Reply to this email directly or view it on GitHub
#10 (comment).
from php-ews.
To recap, I've got
getCalendar(); $start = new DateTime('8:01 AM'); $end = new DateTime('9:00 AM'); $createdItemIds = $calendar->createCalendarItems(array( 'Subject' => 'Test', 'Start' => $start->format('c'), 'End' => $end->format('c'), 'SendMeetingInvitations' => 'SendOnlyToAll', 'RequiredAttendees' => array( array( 'Mailbox' => array( 'Name' => 'Erick Engelke', 'EmailAddress' => '[email protected]', // 'RoutingType' => 'SMTP' ), 'Mailbox' => array( 'Name' => 'engcompc', 'EmailAddress' => '[email protected]', // 'RoutingType' => 'SMTP' ) ) ) )); print_r( $createdItemIds ); ?>On Thu, Mar 10, 2016 at 7:36 AM, Erick Engelke [email protected]
wrote:
No luck, it never sends the Email. I looked at the returned variable with
print_r, there is no error message.Erick
On Thu, Mar 10, 2016 at 7:21 AM, Garethp [email protected] wrote:
If you want to send an email out, you need to add that as an option when
creating. Like this$calendar->createCalendarItems($stuff, array( 'SendMeetingInvitations' => 'SendOnlyToAll'));
Try that, let me know how it goes
—
Reply to this email directly or view it on GitHub
#10 (comment).
from php-ews.
Wouldn't we want something more like:
...
$createdItemIds = $calendar->createCalendarItems(
$x = array(
'Subject' => 'Test',
'Start' => $start->format('c'),
'End' => $end->format('c'),
'SendMeetingInvitations' => 'SendToAllAndSaveCopy',
'Location'=>'here',
'RequiredAttendees' => array(
'Attendee' => array(
'Mailbox' => array(
'Name' => 'Erick Engelke',
'EmailAddress' => '[email protected]'
// 'RoutingType' => 'SMTP'
)
)
)
));
print_r( $x );
print_r( $createdItemIds );
Where we have 'Attendee'? Of course, it still doesn't work.
$x looks like
Array
(
[Subject] => Test
[Start] => 2016-03-10T08:01:00-05:00
[End] => 2016-03-10T09:00:00-05:00
[SendMeetingInvitations] => SendToAllAndSaveCopy
[Location] => here
[RequiredAttendees] => Array
(
[Attendee] => Array
(
[Mailbox] => Array
(
[Name] => Erick Engelke
[EmailAddress] => [email protected]
)
)
)
)
On Thu, Mar 10, 2016 at 7:37 AM, Erick Engelke [email protected]
wrote:
To recap, I've got
getCalendar(); $start = new DateTime('8:01 AM'); $end = new DateTime('9:00 AM'); $createdItemIds = $calendar->createCalendarItems(array( 'Subject' => 'Test', 'Start' => $start->format('c'), 'End' => $end->format('c'), 'SendMeetingInvitations' => 'SendOnlyToAll', 'RequiredAttendees' => array( array( 'Mailbox' => array( 'Name' => 'Erick Engelke', 'EmailAddress' => '[email protected]', // 'RoutingType' => 'SMTP' ), 'Mailbox' => array( 'Name' => 'engcompc', 'EmailAddress' => '[email protected]', // 'RoutingType' => 'SMTP' ) ) ) )); print_r( $createdItemIds ); ?>On Thu, Mar 10, 2016 at 7:36 AM, Erick Engelke [email protected]
wrote:No luck, it never sends the Email. I looked at the returned variable
with print_r, there is no error message.Erick
On Thu, Mar 10, 2016 at 7:21 AM, Garethp [email protected]
wrote:If you want to send an email out, you need to add that as an option when
creating. Like this$calendar->createCalendarItems($stuff, array( 'SendMeetingInvitations' => 'SendOnlyToAll'));
Try that, let me know how it goes
—
Reply to this email directly or view it on GitHub
#10 (comment).
from php-ews.
Note, it still doesn't send an Email to [email protected], even though
I've tried various options.
On Thu, Mar 10, 2016 at 11:34 AM, Erick Engelke [email protected]
wrote:
Wouldn't we want something more like:
...
$createdItemIds = $calendar->createCalendarItems(
$x = array(
'Subject' => 'Test',
'Start' => $start->format('c'),
'End' => $end->format('c'),
'SendMeetingInvitations' => 'SendToAllAndSaveCopy',
'Location'=>'here',
'RequiredAttendees' => array(
'Attendee' => array(
'Mailbox' => array(
'Name' => 'Erick Engelke',
'EmailAddress' => '[email protected]'
// 'RoutingType' => 'SMTP'
)
)
)
));
print_r( $x );
print_r( $createdItemIds );Where we have 'Attendee'? Of course, it still doesn't work.
$x looks like
Array
(
[Subject] => Test
[Start] => 2016-03-10T08:01:00-05:00
[End] => 2016-03-10T09:00:00-05:00
[SendMeetingInvitations] => SendToAllAndSaveCopy
[Location] => here
[RequiredAttendees] => Array
(
[Attendee] => Array
(
[Mailbox] => Array
(
[Name] => Erick Engelke
[EmailAddress] => [email protected]
)) )
)
On Thu, Mar 10, 2016 at 7:37 AM, Erick Engelke [email protected]
wrote:To recap, I've got
getCalendar(); $start = new DateTime('8:01 AM'); $end = new DateTime('9:00 AM'); $createdItemIds = $calendar->createCalendarItems(array( 'Subject' => 'Test', 'Start' => $start->format('c'), 'End' => $end->format('c'), 'SendMeetingInvitations' => 'SendOnlyToAll', 'RequiredAttendees' => array( array( 'Mailbox' => array( 'Name' => 'Erick Engelke', 'EmailAddress' => '[email protected]', // 'RoutingType' => 'SMTP' ), 'Mailbox' => array( 'Name' => 'engcompc', 'EmailAddress' => '[email protected]', // 'RoutingType' => 'SMTP' ) ) ) )); print_r( $createdItemIds ); ?>On Thu, Mar 10, 2016 at 7:36 AM, Erick Engelke [email protected]
wrote:No luck, it never sends the Email. I looked at the returned variable
with print_r, there is no error message.Erick
On Thu, Mar 10, 2016 at 7:21 AM, Garethp [email protected]
wrote:If you want to send an email out, you need to add that as an option
when creating. Like this$calendar->createCalendarItems($stuff, array( 'SendMeetingInvitations' => 'SendOnlyToAll'));
Try that, let me know how it goes
—
Reply to this email directly or view it on GitHub
#10 (comment).
from php-ews.
I'm Stil stuck. Is there a way to see the SOAP message so I can debug that?
Erick
On Thu, Mar 10, 2016 at 11:40 AM, Erick Engelke [email protected]
wrote:
Note, it still doesn't send an Email to [email protected], even though
I've tried various options.On Thu, Mar 10, 2016 at 11:34 AM, Erick Engelke [email protected]
wrote:Wouldn't we want something more like:
...
$createdItemIds = $calendar->createCalendarItems(
$x = array(
'Subject' => 'Test',
'Start' => $start->format('c'),
'End' => $end->format('c'),
'SendMeetingInvitations' => 'SendToAllAndSaveCopy',
'Location'=>'here',
'RequiredAttendees' => array(
'Attendee' => array(
'Mailbox' => array(
'Name' => 'Erick Engelke',
'EmailAddress' => '[email protected]'
// 'RoutingType' => 'SMTP'
)
)
)
));
print_r( $x );
print_r( $createdItemIds );Where we have 'Attendee'? Of course, it still doesn't work.
$x looks like
Array
(
[Subject] => Test
[Start] => 2016-03-10T08:01:00-05:00
[End] => 2016-03-10T09:00:00-05:00
[SendMeetingInvitations] => SendToAllAndSaveCopy
[Location] => here
[RequiredAttendees] => Array
(
[Attendee] => Array
(
[Mailbox] => Array
(
[Name] => Erick Engelke
[EmailAddress] => [email protected]
)) )
)
On Thu, Mar 10, 2016 at 7:37 AM, Erick Engelke [email protected]
wrote:To recap, I've got
getCalendar(); $start = new DateTime('8:01 AM'); $end = new DateTime('9:00 AM'); $createdItemIds = $calendar->createCalendarItems(array( 'Subject' => 'Test', 'Start' => $start->format('c'), 'End' => $end->format('c'), 'SendMeetingInvitations' => 'SendOnlyToAll', 'RequiredAttendees' => array( array( 'Mailbox' => array( 'Name' => 'Erick Engelke', 'EmailAddress' => '[email protected]', // 'RoutingType' => 'SMTP' ), 'Mailbox' => array( 'Name' => 'engcompc', 'EmailAddress' => '[email protected]', // 'RoutingType' => 'SMTP' ) ) ) )); print_r( $createdItemIds ); ?>On Thu, Mar 10, 2016 at 7:36 AM, Erick Engelke [email protected]
wrote:No luck, it never sends the Email. I looked at the returned variable
with print_r, there is no error message.Erick
On Thu, Mar 10, 2016 at 7:21 AM, Garethp [email protected]
wrote:If you want to send an email out, you need to add that as an option
when creating. Like this$calendar->createCalendarItems($stuff, array( 'SendMeetingInvitations' => 'SendOnlyToAll'));
Try that, let me know how it goes
—
Reply to this email directly or view it on GitHub
#10 (comment).
from php-ews.
I'm not sure why you're not getting an email, but I think I can see why your example to add multiple people didn't work. You did it like this
'RequiredAttendees' => array(
array(
'Mailbox' => array(
'Name' => 'Erick Engelke',
'EmailAddress' => '[email protected]',
),
'Mailbox' => array(
'Name' => 'engcompc',
'EmailAddress' => '[email protected]',
)
)
When you needed to do it like this
'RequiredAttendees' => array(
array(
'Mailbox' => array(
'Name' => 'Erick Engelke',
'EmailAddress' => '[email protected]',
),
),
array(
'Mailbox' => array(
'Name' => 'engcompc',
'EmailAddress' => '[email protected]',
)
)
See, the difference is that you had both Mailbox keys in the same array. In PHP, you declare a key twice. They both need to be their own array. I ran a test myself, and this worked for me to add multiple people to an event
$start = new DateTime('8:01 AM');
$end = new DateTime('9:00 AM');
$createdItemIds = $calendar->createCalendarItems(array(
'Subject' => 'Test',
'Start' => $start->format('c'),
'End' => $end->format('c'),
'RequiredAttendees' => array(
array(
'Mailbox' => array(
'Name' => 'Person 1',
'EmailAddress' => '[email protected]',
)
),
array (
'Mailbox' => array(
'Name' => 'Person 2',
'EmailAddress' => '[email protected]'
)
)
)
), array('SendMeetingInvitations' => 'SendOnlyToAll'));
If you want to see the raw API response, you need to be using a debug environment capable of inserting break points in to your code. If you have that, you can put a break point in ExchangeWebServices.php on line 321 to see the response before it's processed
from php-ews.
Good to know.
Erick
On Mon, Mar 14, 2016 at 10:07 AM, Garethp [email protected] wrote:
Also, from what I've gathered, recipients will receive emails but the
person who created the event won't receive one—
Reply to this email directly or view it on GitHub
#10 (comment).
from php-ews.
Related Issues (20)
- 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
- Authentication error after Exchange Extended Protection was enabled HOT 2
- Add Kerberos support
- How to forward an Email
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.