Redemption and SenderName vs. Sender Address

  • Thread starter Thread starter Michael Hyatt
  • Start date Start date
M

Michael Hyatt

I picked up this code on OutlookCode.com:

Function R_GetSenderAddress(objMsg)
Dim strType
Dim objSenderAE ' Redemption.AddressEntry
Dim objSMail ' Redemption.SafeMailItem
Const PR_SENDER_ADDRTYPE = &HC1E001E
Const PR_EMAIL = &H39FE001E

Set objSMail = CreateObject("Redemption.SafeMailItem")
objSMail.Item = objMsg
strType = objSMail.Fields(PR_SENDER_ADDRTYPE)
Set objSenderAE = objSMail.Sender
If Not objSenderAE Is Nothing Then
If strType = "SMTP" Then
R_GetSenderAddress = objSenderAE.Address
ElseIf strType = "EX" Then
R_GetSenderAddress = objSenderAE.Fields(PR_EMAIL)
End If
End If

Set objSenderAE = Nothing
Set objSMail = Nothing
End Function

How can I modify it to get the Sender's name rather than address. (Sorry to
be so dense!)
 
Use the Object Browser when you want to know what properties, methods and
events are available for an object. For a Redemption SafeMailItem use
objSMail.SenderName.
 
Back
Top