PHP Class ExchangeClient, Exchange-Web-Services-for-PHP

Author: Riley Dutton
Author: Rudolf Leermakers
ファイルを表示 Open project: rileydutton/Exchange-Web-Services-for-PHP Class Usage Examples

Public Properties

Property Type Description
$lastError mixed The last error that occurred when communicating with the Exchange server.

Public Methods

Method Description
create_event ( string $subject, string $start, string $end, string $location, $isallday = false ) : boolean Create an event in the user's calendar. Does not currently support sending invitations to other users. Times must be passed as ISO date format.
delete_message ( ItemId $ItemId, $deletetype = "HardDelete" ) : boolean Deletes a message in the mailbox of the current user.
getFolder ( $regex, $parent = 'inbox' )
get_events ( $start, $end )
get_messages ( $limit = 50, $onlyunread = false, $folder = "inbox", $folderIdIsDistinguishedFolderId = true ) : array Get the messages for a mailbox.
get_subfolders ( string $ParentFolderId = "inbox", boolean $Distinguished = TRUE ) : object Get all subfolders of a single folder.
init ( string $user, string $pass, $delegate = NULL, $wsdl = "Services.wsdl" ) : void Initialize the class. This could be better as a __construct, but for CodeIgniter compatibility we keep it separate.
move_message ( ItemId $ItemId, $FolderId ) : ItemID Moves a message to a different folder.
send_message ( mixed $to, string $subject, string $content, $bodytype = "Text", $saveinsent = true, $markasread = true, $attachments = false, mixed $cc = false, mixed $bcc = false ) : boolean Send a message through the Exchange server as the currently logged-in user.

Private Methods

Method Description
get_attachment ( $AttachmentID )
setup ( ) : void Sets up strream handling. Internally used.
teardown ( ) : void Tears down stream handling. Internally used.

Method Details

create_event() public method

Create an event in the user's calendar. Does not currently support sending invitations to other users. Times must be passed as ISO date format.
public create_event ( string $subject, string $start, string $end, string $location, $isallday = false ) : boolean
$subject string
$start string (start time of event in ISO date format e.g. "2010-09-21T16:00:00Z"
$end string (ISO date format)
$location string
return boolean $success (true if the message was created, false if there was an error)

delete_message() public method

Deletes a message in the mailbox of the current user.
public delete_message ( ItemId $ItemId, $deletetype = "HardDelete" ) : boolean
$ItemId ItemId (such as one returned by get_messages)
return boolean $success (true: message was deleted, false: message failed to delete)

getFolder() public method

public getFolder ( $regex, $parent = 'inbox' )

get_events() public method

public get_events ( $start, $end )

get_messages() public method

Get the messages for a mailbox.
public get_messages ( $limit = 50, $onlyunread = false, $folder = "inbox", $folderIdIsDistinguishedFolderId = true ) : array
return array $messages (an array of objects representing the messages)

get_subfolders() public method

Get all subfolders of a single folder.
public get_subfolders ( string $ParentFolderId = "inbox", boolean $Distinguished = TRUE ) : object
$ParentFolderId string string representing the folder id of the parent folder, defaults to "inbox"
$Distinguished boolean Defines whether or not its a distinguished folder name or not
return object $response the response containing all the folders

init() public method

Initialize the class. This could be better as a __construct, but for CodeIgniter compatibility we keep it separate.
public init ( string $user, string $pass, $delegate = NULL, $wsdl = "Services.wsdl" ) : void
$user string (the username of the mailbox account you want to use on the Exchange server)
$pass string (the password of the account)
return void

move_message() public method

Moves a message to a different folder.
public move_message ( ItemId $ItemId, $FolderId ) : ItemID
$ItemId ItemId (such as one returned by get_messages, has Id and ChangeKey)
return ItemID $ItemId The new ItemId (such as one returned by get_messages, has Id and ChangeKey)

send_message() public method

Send a message through the Exchange server as the currently logged-in user.
public send_message ( mixed $to, string $subject, string $content, $bodytype = "Text", $saveinsent = true, $markasread = true, $attachments = false, mixed $cc = false, mixed $bcc = false ) : boolean
$to mixed (the email address or an array of email address to send the message to)
$subject string
$content string
$cc mixed (the email address or an array of email address of recipients to receive a carbon copy (cc) of the e-mail message)
$bcc mixed (the email address or an array of email address of recipients to receive a blind carbon copy (Bcc) of the e-mail message)
return boolean $success. (True if the message was sent, false if there was an error).

Property Details

$lastError public_oe property

The last error that occurred when communicating with the Exchange server.
public mixed $lastError
return mixed