?
Solved

how to send data from vb via outlook express

Posted on 2003-03-09
6
Medium Priority
?
288 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
[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
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
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!

 
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

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

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…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

770 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