Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Done a Million Times

Posted on 2000-03-24
2
Medium Priority
?
294 Views
Last Modified: 2010-05-02
I am trying to send an email from a VB form, I have tried to do it a million times but most of the code that i have found is very complicated. I need something that is simple and easy to understand. The only fields that am using are TO,Subject and message.I prefer using either outlook objects or CDO whichever works.
0
Comment
Question by:hello_200
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
sljbaqga earned 58 total points
ID: 2656200
you can use MAPI Controls comming with VB6
add component MAPI Contols.
then use MAPI Session and MAPI Message controls to send what ever the messages you wants to send.


there is a good sample project comes with MSDN.
its located in <MSDN Path>\98VS\1033\SAMPLES\VB98\misc\Vbmail folder

ex. in my machine it's
C:\Program Files\Microsoft Visual Studio\MSDN98\98VS\1033\SAMPLES\VB98\misc\Vbmail

have a look
regards
Prasad
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2656328
Add Microsoft Outlook to your references:

  Dim x As Outlook.MailItem
  Dim a As Outlook.Application
   
  Set a = New Outlook.Application 'using an open session or loggin on using the default profile
  Set x = a.CreateItem(olMailItem)
  x.To = "Hengel@tecsys.lu"
  x.Subject = "Mail using outlook"
  x.Body = "This is the text to send"
send"
  x.Send
  a.Quit
  Set x = Nothing
  Set a = Nothing

0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

715 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