• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 215
  • Last Modified:

Creating an email message using VB6

I want to create a button to open a new email message with the subject and email address filled in.  Can any one help me please?
0
sgundrum
Asked:
sgundrum
  • 2
1 Solution
 
MarineCommented:
What are you using to send email ? MAPI ? CDONTS ? Other Services ? Give information.
0
 
sgundrumAuthor Commented:
this will be for people using internet mail, outlook express and outlook under 95/98 and possible NT
0
 
amuruCommented:
Use Microsoft MAPI Controls
(Add in the component, C:\windows\system\MSMAPI32.OCX)

On the button click, put command :
<mapictrlname>.compose
<mapictrlname>.send true

0
 
MarineCommented:
If you have a webserver installed then you can adopt to this code.

dim objMail as Object' I am using late bound since i don't know if i can create CDONTS with New Keword
Set objMail = CreateObject("CDONTS.NewMail")
objMail.From "yourcompanyname@cp.com"
objMail.TO text1.text ' send mail to
objMail.Subject text2.text 'subj message
objMail.Body Text3.text 'body message
objMail.Send 'Method to send Mail.
Set objMail = nothing 'Kill Reference.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now