Solved

sending email (C#)

Posted on 2002-07-12
6
384 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
6 Comments
 
LVL 5

Accepted Solution

by:
rpai earned 25 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 69

Assisted Solution

by:Éric Moreau
Éric Moreau earned 25 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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…
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…

707 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

15 Experts available now in Live!

Get 1:1 Help Now