Add Exchange Payload to Profile
Description
This function is used to add a new Exchange payload to the specified profile.
Syntax
Public Function AddExchangePayloadToProfile (profileId As Integer, AccountName As String, DomainandUserName As String, Password As String, EmailAddress As String, ExchangeActiveSyncHost As String, UseSSL As Boolean,PastDaysofMailtoSync As Integer, AllowMove As Boolean, UseOnlyinMail As Boolean, UseSMIME As Boolean, AllowRecentAddressSyncing As Boolean, Syncinterval As String, SyncEmail As Boolean, SyncCalendar As Boolean, SyncContacts As Boolean, SyncTasks As Boolean, ByVal changelogComment As String) As Boolean
Parameters
ProfileID (Integer)
The ID of the profile you wish to add the exchange payload to
AccountName (String)
Name for the Exchange ActiveSync/Web Services Account
DomainandUserName
This string specifies the user name for this Exchange account. If missing, the devices prompts for it during profile installation. Format is <domain>\<username> e.g. mydomain.com\$LoginName$
Password
EmailAddress
Specifies the full email address for the account. The owners (primary user) email address must be injected upon delivery to the device. If not present in the payload, the device prompts for this string during profile installation.
ExchangeActiveSyncHost
Specifies the Exchange server host name (or IP address)
UseSSL
Specifies whether the Exchange server uses SSL for authentication.
PastDaysofMailtoSync
The number of past days of mail to synchronize. No limit = 0. Allowed values: 0,1,3,7,14,31
AllowMove
Optional. Default false. If set to true, messages may not be moved out of this email account into another account. Also prevents forwarding or replying from a different account than the message was originated from
UseOnlyinMail
Optional. Default false. If set to true, this account will not be available for sending mail in third party applications
UseSMIME
Optional. Default false. If set to true, this account supports S/MIME
AllowRecentAddressSyncing
If true, this account is excluded from address Recents syncing. This defaults to false.
Syncinterval
How often the device will sync with the Exchange server. Allowed values: Automatic Push, Manually, 15 minutes, 30 minutes, 60 minutes
SyncEmail
Whether to synchronize email between the device and the server
SyncCalendar
Whether to synchronize calendar between the device and the server
SyncContacts
Whether to synchronize contacts between the device and the server
SyncTasks
Whether to synchronize tasks between the device and the server
ChangelogComment (String)
Comment you wish to be added to the changelog
Return value
Returns a boolean value. True if succeeded, false if not.
Example
Set oCMS = CreateObject("CapaInstaller.SDK") Wscript.echo oCMS.SetDatabaseSettings("ServerName", "Capainstaller", False) Wscript.echo oCMS.SetDefaultManagementPoint("2") Dim iProfileId : iProfileId = 6 Dim sAccountName : sAccountName = "tre" Dim sDomainandUserName : sDomainandUserName = "tre@myco.com" Dim sPassword : sPassword = "1234" Dim sEmailAddress : sEmailAddress = "tre@myco.com" Dim sExchangeActiveSyncHost : sExchangeActiveSyncHost = "outlook.office365.com" Dim bUseSSL : bUseSSL = True Dim iPastDaysofMailtoSync : iPastDaysofMailtoSync = 14 Dim bAllowMove : bAllowMove = True Dim bUseOnlyinMail : bUseOnlyinMail = False Dim bUseSMIME : bUseSMIME = False Dim bAllowRecentAddressSyncing : bAllowRecentAddressSyncing = True Dim sSyncinterval : sSyncinterval = "30 minutes" Dim bSyncEmail : bSyncEmail = True Dim bSyncCalendar : bSyncCalendar = True Dim bSyncContacts : bSyncContacts = False Dim bSyncTasks : bSyncTasks = False Dim sChangelogComment : sChangelogComment = "Added exchange with sdk" Wscript.echo "Added Exchange payload: " & oCMS.AddExchangePayloadToProfile(iProfileId, sAccountName, sDomainandUserName, sPassword, sEmailAddress, sExchangeActiveSyncHost, bUseSSL, iPastDaysofMailtoSync, bAllowMove, bUseOnlyinMail, bUseSMIME, bAllowRecentAddressSyncing, sSyncinterval, bSyncEmail, bSyncCalendar, bSyncContacts, bSyncTasks, sChangelogComment)