EPDM API Add-in to get email addresses for users in group

Our company is collaborating with several outside team players who do not have EPDM but need to know when files have changed through the ECO process because the changes could affect the portion of the effort they are responsible for. So there is a need to email the ECO document to several people in a group. These people are on our domain so I have emails for them in a PDM group in the vault.

I am able to gather the group members and their names but need code to also extract their email address stored in the vault using this code:

Private Sub ListGroupMembers(ByVal vault As EdmVault5, ByVal groupName As String)

'The following code shows a message box with the names of all users who are members of a group with a certain name:

On Error GoTo ErrHand

Dim userMgr As IEdmUserMgr5

userMgr = vault

Dim group As IEdmUserGroup5

group = userMgr.GetUserGroup(groupName)

If group Is Nothing Then

MsgBox(

"There is no group named " + groupName + ".")

Exit Sub

End If

Dim pos As IEdmPos5

pos = group.GetFirstUserPosition

Dim message As String

message =

"The following users are member of group " + groupName + ":" + vbLf

While Not pos.IsNull

Dim user As IEdmUser5

user = group.GetNextUser(pos)

message = message + user.Name + vbLf

' Send email code needs to go here! :)

End While

MsgBox(message)

Exit Sub

ErrHand:

HandleError(Err.Number)

End Sub

<>

Thanks in advance.

SolidworksSolidworks Pdm enterprise Pdm