Outlook Outgoing Message Account?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top