?
Solved

how to send data from vb via outlook express

Posted on 2003-03-09
6
Medium Priority
?
291 Views
Last Modified: 2010-05-01
how to send mail from visual basic via outlook express.
    i am doing project in vb flatform  how to send mail from vb to net via outlook express.
0
Comment
Question by:kathavarayan
6 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 280 total points
ID: 8102048
You cannot directly use OE to send e-mail because it does not support automation (you cannot do a : dim x as new outlookexpress).

You can try the mailto: protocol that opens the default e-mail application or create a .eml file and use ShellExecute to open it in OE. None of these will automatically send it.

a very valid workaround is : http://www.freevbcode.com/ShowCode.Asp?ID=109
0
 
LVL 1

Expert Comment

by:rafsalman
ID: 8118539
try something like this



SendEmail = False    'initialises Return value
 
  MAPISession.SignOn 'raf - begins MAPI session

'associates MAPIMessaages control to the sessionID of a MAPISession Control that has been successfully signed on

  MAPIMessages.SessionID = MAPISession.SessionID
 
 
  MAPIMessages.Compose    'composes new message
 
  'selects recipient email address, mailtoaddress is string variable

  MAPIMessages.RecipAddress = MailToAddress
 
  'sets subject name of email
 

    MAPIMessages.MsgSubject = "YourSubject"
 
   
   
 
  ' Showmessage Dialog allows user to add various components of the message then sends if true, if false Submits the outgoing message to the mail server without displaying a dialog box.
 
  MAPIMessages.Send ShowMessageDialog
 
 
  'ends MAPI session
  MAPISession.SignOff
0
 

Expert Comment

by:CleanupPing
ID: 8900419
kathavarayan:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 49

Expert Comment

by:DanRollins
ID: 9074598
Moderator, my recommended disposition is:

    Save as PAQ -- No Refund.

DanRollins -- EE database cleanup volunteer
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 9075310
My recommandation: accept emoreau's comment
0
 

Expert Comment

by:YensidMod
ID: 9165952
Points to emoreau.

Yensidmod
EE Moderator
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
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…

612 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