Solved

Creating an email message using VB6

Posted on 2000-02-17
4
185 Views
Last Modified: 2010-05-02
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
Comment
Question by:sgundrum
  • 2
4 Comments
 
LVL 6

Expert Comment

by:Marine
ID: 2533621
What are you using to send email ? MAPI ? CDONTS ? Other Services ? Give information.
0
 

Author Comment

by:sgundrum
ID: 2533623
this will be for people using internet mail, outlook express and outlook under 95/98 and possible NT
0
 

Accepted Solution

by:
amuru earned 50 total points
ID: 2533634
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
 
LVL 6

Expert Comment

by:Marine
ID: 2533638
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now