I want to find a simple way to send emails from within a VB 6 applkication.
I have been unsuccessful in using MAPI (see code below) possibly due to my not being familiar with the MAPI commands and that I do not have MS Outlook or Outlook Express installed on my computer. Here is what I have tried:
Private Sub Form_Load()
MAPISession1.NewSession = True
MAPIMessages1.SessionID = MAPISession1.SessionID
Private Sub cmdSend_Click()
MAPIMessages1.MsgIndex = -1
MAPIMessages1.RecipAddress = "JohnDoe@earthlink.net"
MAPIMessages1.MsgSubject = "Subject line of this email"
MAPIMessages1.MsgNoteText = "Text of this email"
Private Sub cmdExit_Click()
When I run the above app, I get this message: "Microsoft Office Outlook" "No profiles have been created. To create a new profile, use the Mail icon in the Control Panel."
After clicking the "OK" button on the error message, I get a MS VB Run-time error '32003': Login has failed" on the "MAPISession1.SignOn" line.
I would prefer to not install Outlook on my computer as I use a web email service. Is there any way around this or another way in VB 6 so send emails?
Thanks for the help.