Outlook Outgoing Message Account?

  • Thread starter Thread starter -=Sojourn=-
  • Start date Start date
S

-=Sojourn=-

I'm tying to get outlook to determine if I am sending an email out
through a newsletter account I have, or my regular account, and to
notify me when I send it out through my newsletter account. But when
trying to access the Sender information, I am getting nothing.... If
anyone can shed some light would appreciate it.

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As
Boolean)
Dim olMailItem As MailItem

If Item.Class <> olMail Then Exit Sub

Set olMailItem = Item
olMailItem.Save
MsgBox olMailItem.SenderEmailAddress
MsgBox olMailItem.SenderEmailType
MsgBox olMailItem.SenderName
End Sub
 
Back
Top