
-----------------------------------
SNIPERDUDE
Thu May 08, 2008 1:22 pm

Email in VB6
-----------------------------------
We need (or rather want - to make our lives easier) to create a programme
at my co-op placement that can automatically do the system checks online
(we are fine for that part) instead of manually and email the results to the
IT department.

Was wondering how to solve that part - really stuck.
Anybody have any ideas about how to do this
(the emailing part)?

Any help would be greatly appreciated.

-----------------------------------
btiffin
Thu May 08, 2008 2:39 pm

Re: Email in VB6
-----------------------------------
I'm not a VB guy, but there is a MAPI control.  Try something like
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
Umm, don't ask me to explain it.  Especially the part about  MAPIMessages1.Send False. I just snagged it after googling "sending email in vb6"

Cheers

-----------------------------------
Phazor
Thu May 08, 2008 10:30 pm

Re: Email in VB6
-----------------------------------
hey !Leolo !
i already figured it out. i think you can stop searching now :D 
remind me to tell what it is if i don't remember. l8r
