Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Function CreateAccount(ByVal mailServerId As Long, emailAddress As String, givenName As String, surname As String,
- mobileNumber As String, displayName As String, description As String, subscriptionId As Long, companyId As Long,
- password As String) As String
- Dim sendSms = Request.Form("sendsms")
- DebugMessage &= "Create Account: " & emailAddress & ", givenName:" & givenName & ", surname:" & surname & ", mobileNumber:" & mobileNumber &
- ", displayName:" & displayName & ", description:" & description & ", sendSms:" & sendSms & " <br/>"
- Dim driverStatus As Long
- Dim input As Object = PopulateCreateAccountInput(mailServerId, emailAddress, givenName, surname, mobileNumber, displayName, description, subscriptionId, password)
- Dim driverResultCreate As String = GetDriverResultWithStatus(mailServerId, "MAIL_ACCOUNT_CREATE", input, driverStatus)
- If driverStatus > 0 Then
- Return driverResultCreate
- End If
- SetEmailAddressOnSubscription(emailAddress, subscriptionId, companyId, mailServerId)
- If sendSms = "true" Then
- SendSmsPassword(subscriptionId, mobileNumber, password, emailAddress)
- End If
- Dim driverResultQuota = SetQuotaOnAccount(mailServerId, emailAddress, subscriptionId, driverStatus)
- If driverStatus > 0 Then
- Return driverResultQuota
- End If
- Return driverResultCreate
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement