MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
'Compose new message
MAPIMessages1.Compose
'Address message
MAPIMessages1.RecipDisplayName = "Recipient Name"
MAPIMessages1.RecipAddress =
email@somesite.moc
' Resolve recipient name
MAPIMessages1.AddressResolveUI = True
MAPIMessages1.ResolveName
'Create the message
MAPIMessages1.MsgSubject = "System Scan results"
MAPIMessages1.MsgNoteText = "The message data goes here"
'Add attachment
MAPIMessages1.AttachmentPathName = "c:\xyzzy.zip"
'Send the message
MAPIMessages1.Send False
MAPISession1.SignOff