Click or drag to resize

IFindPersonsByEmail Method

find collection of Persons using e-mail addresses Search and retrieve persons by their email address. This will return all persons that have an email address like the email given as search string. Does not accept partial address, but wildcards does work

Namespace:  SuperOffice.COM.SuperOfficeDB
Assembly:  SuperOfficeDB.Interop (in SuperOfficeDB.Interop.dll) Version: 8.0.0.0
Syntax
SOPersons PersonsByEmail(
	string Email
)

Parameters

Email
Type: SystemString
search argument (email address)

Return Value

Type: SOPersons
SOContacts a collection of persons matching 'Email'.
Examples

PersonsByEmail

This text may be copied to the notepad, and saved as a *.vbs file. Remember to change the login information.

The source code below logs on to the database, and search and retrieves all persons with an email address like 'sdk@SuperOffice.com'.

VB
dim objso
set objso = CreateObject("superofficedb.database")
If not (objSO is nothing) Then
    objso.login  "<USERID>", "<password>"
    set  objperson = objso.find.personsbyemail("sdk@superoffice.com")
    set  person = objperson.getfirst
    while  not objperson.eof
        item = person.firstname &  " " & person.lastname
        msgbox item
        set person = objperson.getnext
    wend
    msgbox "thats  all..."
else
    msgbox  "could not log in"
end if
set objso = nothing

See Also