473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Trying to get a windows form to email



Hey there

I have beentrying to get a windows form to send an email thru outlook
and cannot find the right code. Does anyone know how to do this?

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #1
3 3931
Don,

You will have to set a reference to the Microsoft Outlook Object Library
and the Microsoft Office Object Library on the COM when you select "Add
References". This will allow you to access the outlook object model.

However, when you do this, you will probably get security dialogs
whenever you try and do anything, because of Outlook's security model.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- ni**************@exisconsulting.com

"Don Stevic" <do*@comptec.com> wrote in message
news:eW**************@TK2MSFTNGP11.phx.gbl...


Hey there

I have beentrying to get a windows form to send an email thru outlook
and cannot find the right code. Does anyone know how to do this?

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 15 '05 #2
Hey Don,
Try
System.Diagnostics.Process.Start("mailto:na**@emai laddress.end");

HTH
Steve
"Don Stevic" <do*@comptec.com> wrote in message
news:eW**************@TK2MSFTNGP11.phx.gbl...


Hey there

I have beentrying to get a windows form to send an email thru outlook
and cannot find the right code. Does anyone know how to do this?

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 15 '05 #3
Hello

How can i override attachment process by assinging path of file from my
C# form and attaching it to currently opened mail item,and set the
subject field from my open form

right now it`s setting Subject field value in all opened Mail Windows
here is thecode i am trying.

private Ol.MailItem mailItem=null;

private void button1_Click(object sender, System.EventArgs e)
{

this.mailItem=(Ol.MailItem)myInspector.CurrentItem ;
this.mailItem.Subject="mySubj";
//MessageBox.Show(mailItem.Subject.ToString(),"Butto n");

}

Thanks

-adnan

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: charlie fortune | last post by:
I have a simple html form and a bit of PHP in the same page, and I want the script to get the entry from the form, and write it to a file. I dont think I'm allowed to use POST on my webspace. Here...
6
by: Ayende Rahien | last post by:
Excetremely annoying problem, I've an application with a long startup time. So I created another form with my logo in it to as a splash screen. The splash screen is run from another thread and is...
4
by: Claire | last post by:
Running XP pro, SP2. Visual studio .NET 2003. App written in C# I have written an application that hides itself when run and shows a notification icon in the system tray. If the main form is...
3
by: Nathan Kovac | last post by:
I have a feeling I am missing something simple, but I just can't find it. Perhaps someone can give me a lead on where to look. I will describe the issue then post my code to the web service. My...
2
by: Wayne Wengert | last post by:
I am trying to use the HttpUtility methods shown below in a Windows Form. I cannot get Intellisense to accept the code - I've used Imports System.Web and I also tried adding the specific name space...
2
by: baret bonden | last post by:
Trying to return a selected listbox item to another form .tried lots of ways; defining public variables and passing those as well as textboxes ..I' m able to display the chosen item on it's form...
2
by: neilphan | last post by:
Hi Guys, I need a quick reference to Windows Application Development in dotNet. I'm fairly good at the Web Development using asp.net though i'm new to the Windows Desktop Application...
6
by: Boldgeek | last post by:
I am trying to develop an app that will allow automatic updating of a web form which uses multipart/form-data enctype (as it MIGHT be sending an image) I have an example form, which when...
24
by: jerrydigital | last post by:
Hello, I am new to this forum but have read several posts and I thank you for your great assistance. I am stumped right now. I have a user registration form in asp that is set to a form...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.