Visual Basic FAQs
AccountService interface
Enables you to find out information about your Account.
Implemented by AccountService class
Dim service as new EsendexLib.AccountService
Initialise method
Initialise the class with your Esendex credentials. You must call this method before you call any other on the interface.
Sub Initialise(Username As String, Password As String, Account As String, [IsServerSide])
Parameters
- Username Your Esendex username.
- Password Your Esendex password.
- Account Your Esendex Account Reference.
- IsServerSide (optional) True if the component is running within an ASP page; false or otherwise. The default is false.
GetMessageLimit function
Returns the remaining message limit on your account.
Function GetMessageLimit() As Long
Return Value: The number of messages remaining on your account.
GetAccountFeatures function
Returns the features that are enabled on your Account.
Function GetAccountFeatures() As Long
Return Value: The features enabled on your Account. This can be a combination of: ACCOUNT_FEATURE_NONE, ACCOUNT_FEATURE_SERVICE_ALIASING and ACCOUNT_FEATURE_INBOX
GetAccountState function
Returns a state object that contains information about your Account.
Function GetAccountState() As AccountState
Return Value: An object that contains information about your Account, including the Id assigned by Esendex, the Reference, Address, Service Alias, Messsage Limit and features.
ContactService interface
Enables you to retrieve, add, edit and delete Contacts and Contact Groups.
Implemented by ContactService class
Dim service as new EsendexLib.ContactService
Initialise method
Initialise the class with your Esendex credentials. You must call this method before you call any other on the interface.
Sub Initialise(Username As String, Password As String, Account As String, [IsServerSide])
Parameters
- Username Your Esendex username.
- Password Your Esendex password.
- Account Your Esendex Account reference.
- IsServerSide (optional) True if the component is running within an ASP page; false or otherwise. The default is false.
GetContacts function
Returns a list of Contacts associated with your Account.
Function GetContacts() As ObjectCollection
Return Value: A collection containing the Contacts associated with your Account.
GetGroups function
Returns a list of Contact Groups associated with your Account.
Function GetGroups() As ObjectCollection
Return Value: A collection containing the Contact Groups associated with your Account.
AddContact function
Adds a Contact to your Account.
Function AddContact(Contact) As String
Parameters
- Contact The contact you want to add.
Return Value: The Id assigned to the Contact by Esendex.
AddContacts function
Adds multiple Contacts to your Account.
Function AddContacts(Contacts as ObjectCollection) As StringCollection2
Parameters
- Contacts A collection containing the Contacts you want to add.
Return Value: A collection containing the Ids assigned to the Contacts by Esendex.
AddGroup function
Adds a Contact Group to your Account.
Function AddGroup(Group, MemberIDs as String) As String
Parameters
- Group The Contact Group you want to add.
- MemberIDs A comma-separated list containing the Ids of the Contacts that should become members of the Group.
Return Value: The Id assigned to the Contact Group by Esendex.
DeleteContact method
Deletes a Contact from your Account.
Sub DeleteContact(ContactID as String)
Parameters
- ContactID The Id of the Contact you want to delete.
DeleteContacts method
Deletes multiple Contacts from your Account.
Sub DeleteContacts(ContactIDs as String)
Parameters
- ContactIDs A comma-separated list containing the Ids of the Contacts you want to delete.
DeleteGroup method
Deletes a Contact Group from your Account.
Sub DeleteGroup(GroupID as String, [IncludeMembers])
Parameters
- GrouptID The Id of the Contact Group you want to delete.
- IncludeMembers (optional) True if you want to delete the Contact members as well as the group.
UpdateContact method
Updates one of your Account’s Contacts.
Sub UpdateContact(Contact)
Parameters
- Contact The Contact you want to update.
UpdateGroup method
Updates one of your Account’s Contact Groups.
Sub UpdateGroup(Group, MemberIDs as String)
Parameters
- Group The Contact Group you want to update.
- MemberIDs A comma-separated list containing the Ids of the Contacts that should become members of the Group.
GetContact function
Retrieves a Contact from your Account.
Function GetContact(ContactID as String) As Contact
Parameters
- ContactID The Id of Contact you want to retrieve.
Return Value: The Contact.
GetGroup function
Retrieves a Contact Group from your Account.
Function GetGroup(GroupID as String) As Group
Parameters
- GroupID The Id of the Contact Group you want to retrieve.
Return Value: The Group.
GetGroupMembers function
Retrieves the Contact members within a Contact Group.
Function GetGroupMembers(GroupID as String) As ObjectCollection
Parameters
- GroupID The Id of the Contact Group whose members you want to retrieve.
Return Value: A collection containing the Contact Group’s members.
GetContactByQuickName function
Retrieves a Contact using it’s QuickName.
Function GetContactByQuickName(QuickName as String) As Contact
Parameters
- QuickName The QuickName of the Contact you want to retrieve.
Return Value: The Contact.
GetGroupByName function
Retrieves a Contact Group from your Account.
Function GetGroupByName(GroupName as String) As Group
Parameters
- GroupName The name of the Contact Group you want to retrieve.
Return Value: The Contact Group.
Messenger Sample
The messenger folder contains a Visual Basic project that shows the usage of the SDK in an application.It displays the contents of your Esendex inbox. You can delete Messages from your Inbox and send an SMS Message.