• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 217
  • 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?
  • 2
1 Solution
What are you using to send email ? MAPI ? CDONTS ? Other Services ? Give information.
sgundrumAuthor Commented:
this will be for people using internet mail, outlook express and outlook under 95/98 and possible NT
Use Microsoft MAPI Controls
(Add in the component, C:\windows\system\MSMAPI32.OCX)

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

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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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