I upgraded to smartermail 13x (Free Edition) and trying to create email user using smarter mail web services in asp.net. but getting following error:
Server was unable to process request. ---> User not found.
I am using following code:
MailboxAdd("http://172.16.11.71:9998/Services/", "admin", "P@ssw0rd", "Faheemsial", "P@ssw0rd", "smartermaildomain.com", "Faheem", "Sial", False, "faheemsial@smartermaildomain.com", NewSettings, False, 200, False)
----------------------------------------------------------------------------------------------------------------------------
Public Function MailboxAdd(ByVal ServiceURL As String, ByVal AuthUserName As String, ByVal AuthPassword As String, ByVal NewUsername As String, _
ByVal NewPassword As String, ByVal DomainName As String, ByVal FirstName As String, _
ByVal LastName As String, ByVal AllowRedirect As Boolean, _
ByVal EmailAddress As String, ByVal NewSettings As String(), _
ByVal IsDomainAdmin As Boolean, ByVal MailboxSize As String, ByVal SetActiveSync As Boolean) As SmarterMail5x.User.GenericResult
Dim RetVal As ConsoleMiscApp.SmarterMail5x.User.GenericResult
Dim Ret As ConsoleMiscApp.SmarterMail5x.User.UserInfoResult
Dim RetSync As ConsoleMiscApp.SmarterMail5x.User.GenericResult
Dim User As New ConsoleMiscApp.SmarterMail5x.User.svcUserAdmin
Try
'User.Url = ServiceURL & "svcUserAdmin.asmx"
If ServiceURL.EndsWith("/") Then
User.Url = ServiceURL & "svcUserAdmin.asmx"
Else
User.Url = ServiceURL & "/svcUserAdmin.asmx"
End If
With User
.AllowAutoRedirect = AllowRedirect
'RetVal = .AddUser(AuthUserName, AuthPassword, NewUsername, NewPassword, DomainName, FirstName, LastName, IsDomainAdmin) ', Convert.ToInt32(MailboxSize))
RetVal = .AddUser2(AuthUserName, AuthPassword, NewUsername, NewPassword, DomainName, FirstName, LastName, IsDomainAdmin, Convert.ToInt32(MailboxSize))
Console.WriteLine("AddUser2= " & RetVal.ResultCode & " " & RetVal.Result & " " & RetVal.Message)
If RetVal.ResultCode = 0 Then
Ret = .GetUser(AuthUserName, AuthPassword, EmailAddress)
Console.WriteLine("GetUser= " & Ret.ResultCode & " " & Ret.Result & " " & Ret.Message)
If Ret.ResultCode = 0 Then
RetVal = .SetRequestedUserSettings(AuthUserName, AuthPassword, EmailAddress, NewSettings)
Console.WriteLine("SetRequestedUserSettings= " & RetVal.ResultCode & " " & RetVal.Result & " " & RetVal.Message)
RetSync = .ToggleActiveSync(AuthUserName, AuthPassword, EmailAddress, SetActiveSync)
End If
End If
End With
User.Dispose()
Catch ex As Exception
Console.Write(ex.Message)
End Try
Return RetVal
End Function
Any help?