Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

E-Mailing Info Entered in an vb6 app.

Status
Not open for further replies.

andrewvampire

Programmer
Feb 13, 2001
18
US
I am wondering how you would get a program to e-mail you when someone enter's data and then clicks a button.
 
This wasn't very helpful because of one reason, I don't know how to use those controls and I am a begginner, I also don't have winsock or anything of that sort
 
This Works for me:

Add the MicroSoft MAPI control 6.0 to your project and place a 'MAPISession' and a 'MAPIMessages' on a form (here:MyForm).
Here's the code that sends the mail:

MyForm.MAPISession1.LogonUI = True
MyForm.MAPISession1.UserName = "YourUserName"
MyForm.MAPISession1.SignOn
With MyForm.MAPIMessages1
.SessionID = MyForm.MAPISession1.SessionID
.Compose
.RecipDisplayName = "mymail@myserver.com"
.MsgSubject = "TheSubject"
.MsgNoteText = "TheMail"
.ResolveName
.Send
End With
MyForm.MAPISession1.SignOff

Good luck :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top