Jump to content

Using COM objects or importing to Outlook


bwcc

Recommended Posts

I've been asked to look at developing a web-based system for tracking forms.  In itself, it is fairly simple.  However, one item they want to look at is Outlook integration for tasks.  We use an internal exchange server and I have read about being able to use COM objects to write tasks for Outlook from PHP.  However, I'm having difficulty with this part.  The script I do have is timing out and documentation on using COM objects is fairly sparse.  Should I be looking at something other than PHP?  Any insight would be appreciated.  The script I do have is below.

 

/* Define Outlook number for Task Item */
$olTaskItem = 3; 

/* Create an instance of Outlook */ 
$ol = new COM("Outlook.Application"); 

/* Create a Task Item */
$task = $ol->CreateItem($olTaskItem); 

/* Set dates for current week. */ 
$begin = date("m/d/y", strtotime("last Sunday")); 
$end = date("m/d/y", strtotime("this Saturday")); 
$due = date("m/d/y", strtotime("this Friday")); 

/* Set some properties of the task */ 
$task->Subject = "Notes for $begin to $end"; 
$task->DueDate = $due; 
$task->Body = "Insert the template text for your task"; 

/* Save the Task */ 
$task->Save(); 

print("Done"); 

  • 5 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.