Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

sending email (C#)

Posted on 2002-07-12
6
Medium Priority
?
391 Views
Last Modified: 2010-05-02

hi friens,

i need to create a program (C#.NET) where i send a email through outlook.  
Is there anyone having some sample code?

Thanks!
0
Comment
Question by:hugotorres32
[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 5

Accepted Solution

by:
rpai earned 100 total points
ID: 7150236
Sub Email()
 
  Dim objOL As Object
  Dim objEMail As Object
 
  '-- Opens Outlook
  Set objOL = CreateObject("Outlook.Application")

  '-- Opens new email
  Set objEMail = objOL.CreateItem(olMailItem)

  With objEMail
      .Recipients.Add "me@me.com"
      .Subject = "Hello..!"
      .Body = "Details"
      '-- To send an attachment
      .Attachments.Add ("C:\myFolder\Test.txt")
      .Send
  End With
 
  Set objEMail = Nothing
     
End Sub
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7150257
hummm... there is a .net TA at EE.
0
 
LVL 70

Assisted Solution

by:Éric Moreau
Éric Moreau earned 100 total points
ID: 7150293
0
 

Author Comment

by:hugotorres32
ID: 7157504
Ok emoreau but this email must be like appointment...thanks for your help
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 9664204
Hi hugotorres32,
It appears that you have forgotten to close this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Split points between: rpai and emoreau

hugotorres32, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept THIS comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

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…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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

610 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