Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Email in VB6
Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
SNIPERDUDE




PostPosted: Thu May 08, 2008 1:22 pm   Post subject: 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.
Sponsor
Sponsor
Sponsor
sponsor
btiffin




PostPosted: Thu May 08, 2008 2:39 pm   Post subject: Re: Email in VB6

I'm not a VB guy, but there is a MAPI control. Try something like
VB:

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




PostPosted: Thu May 08, 2008 10:30 pm   Post subject: Re: Email in VB6

hey !Leolo !
i already figured it out. i think you can stop searching now Very Happy
remind me to tell what it is if i don't remember. l8r
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Visual Basic Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: