Created
January 1, 2015 07:00
-
-
Save asith-w/f2d43fb0d2ad920fa21a to your computer and use it in GitHub Desktop.
findPeopleSOAP /getSendMailSOAPMessage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getSendMailSOAPMessage() { | |
var soapMsg = | |
'<?xml version="1.0" encoding="utf-8"?>' + | |
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ' + | |
' xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" ' + | |
' xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" ' + | |
' xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">' + | |
'<soap:Header>' + | |
' <t:RequestServerVersion Version="Exchange2007_SP1" />' + | |
'</soap:Header>' + | |
'<soap:Body>' + | |
' <m:CreateItem MessageDisposition="SendAndSaveCopy">' + | |
' <m:SavedItemFolderId>' + | |
' <t:DistinguishedFolderId Id="sentitems" />' + | |
' </m:SavedItemFolderId>' + | |
' <m:Items>' + | |
' <t:Message>' + | |
' <t:Subject>Company Soccer Team</t:Subject>' + | |
' <t:Body BodyType="HTML">Are you interested in joining?</t:Body>' + | |
' <t:ToRecipients>' + | |
' <t:Mailbox>' + | |
' <t:EmailAddress>sadie@test.com </t:EmailAddress>' + | |
' </t:Mailbox>' + | |
' </t:ToRecipients>' + | |
' </t:Message>' + | |
' </m:Items>' + | |
' </m:CreateItem>' + | |
'</soap:Body>' + | |
'</soap:Envelope>' | |
return soapMsg; | |
} | |
function findPeopleSOAP() { | |
var soapMsg = | |
'<?xml version="1.0" encoding="UTF-8"?>' + | |
'<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" ' + | |
'xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" ' + | |
'xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"> ' + | |
'<soap:Header> ' + | |
' <t:RequestServerVersion Version="Exchange2013" /> ' + | |
'</soap:Header> ' + | |
'<soap:Body > ' + | |
' <m:FindPeople> ' + | |
' <m:IndexedPageItemView BasePoint="Beginning" MaxEntriesReturned="100" Offset="0"/> ' + | |
' <m:ParentFolderId> ' + | |
' <t:DistinguishedFolderId Id="contacts"/> ' + | |
' </m:ParentFolderId> ' + | |
' </m:FindPeople> ' + | |
'</soap:Body> ' + | |
'</soap:Envelope> ' | |
return soapMsg; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment