Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: Closing an open Task Manager window Pin
Heath Stewart8-May-04 20:04
protectorHeath Stewart8-May-04 20:04 
GeneralRe: Closing an open Task Manager window Pin
ian mariano13-May-04 18:42
ian mariano13-May-04 18:42 
GeneralRe: Closing an open Task Manager window Pin
Heath Stewart14-May-04 2:03
protectorHeath Stewart14-May-04 2:03 
GeneralRe: Closing an open Task Manager window Pin
ian mariano14-May-04 3:36
ian mariano14-May-04 3:36 
GeneralUnRegister a Service Process Pin
Nagendra Kamath K8-May-04 4:58
Nagendra Kamath K8-May-04 4:58 
GeneralRe: UnRegister a Service Process Pin
ian mariano13-May-04 18:57
ian mariano13-May-04 18:57 
GeneralUsing outlook to send messages. Pin
mpalle8-May-04 4:35
mpalle8-May-04 4:35 
GeneralRe: Using outlook to send messages. Pin
Heath Stewart8-May-04 20:01
protectorHeath Stewart8-May-04 20:01 
First of all, do you need to actually submit it, or just create a new mail message? If it's the latter case, then just use something like this:
Proces.Start("mailto:user@domain.com?Subject=test");
This will create a new message with any initial subject or body message you specify using the default MAPI client.

If you want a tried-and-true way, just communicate with the SMTP server yourself (the .NET Framework 2.0 will have much better support for this, including support for multi-part MIME messages). There is code on the 'net to get the MX record for a mail host (I've got a solution floating around somewhere here on CodeProject) and use the simple SMTP commands and a TcpClient to send mail to the SMTP server. There are plenty examples of this on the 'net as well. Just google.

You'll have a hard time finding a solution that works with all Outlook versions because they have changed a lot from version to version, patching security holes with terrible solutions. The best way - though pretty inflexible - is through MAPI. There are articles here on CodeProject that cover this. Not everything is available using MAPI, but enough to create and send an email (not browse the address book, however, which is only available to C/C++ clients - or a .NET assembly that P/Invokes the functionality required).

 

Microsoft MVP, Visual C#
My Articles
GeneralRe: Using outlook to send messages. Pin
mpalle8-May-04 22:24
mpalle8-May-04 22:24 
GeneralRe: Using outlook to send messages. Pin
Heath Stewart9-May-04 2:23
protectorHeath Stewart9-May-04 2:23 
GeneralRe: Using outlook to send messages. Pin
mpalle9-May-04 2:39
mpalle9-May-04 2:39 
GeneralGet name of variable Pin
Stefan Troschuetz8-May-04 4:06
Stefan Troschuetz8-May-04 4:06 
GeneralRe: Get name of variable Pin
Hesham Amin8-May-04 4:13
Hesham Amin8-May-04 4:13 
GeneralRe: Get name of variable Pin
Stefan Troschuetz8-May-04 4:22
Stefan Troschuetz8-May-04 4:22 
GeneralRe: Get name of variable Pin
kayhustle8-May-04 16:03
kayhustle8-May-04 16:03 
GeneralRe: Get name of variable Pin
Stefan Troschuetz9-May-04 0:51
Stefan Troschuetz9-May-04 0:51 
GeneralRe: Get name of variable Pin
Heath Stewart8-May-04 19:29
protectorHeath Stewart8-May-04 19:29 
GeneralRe: Get name of variable Pin
Stefan Troschuetz9-May-04 0:42
Stefan Troschuetz9-May-04 0:42 
GeneralRe: Get name of variable Pin
Heath Stewart9-May-04 2:51
protectorHeath Stewart9-May-04 2:51 
Generaladd a property Pin
cristina_tudor8-May-04 2:48
cristina_tudor8-May-04 2:48 
GeneralRe: add a property Pin
Dave Kreskowiak8-May-04 3:17
mveDave Kreskowiak8-May-04 3:17 
GeneralC# Questions relating to TextBox Pin
Member 6910898-May-04 0:33
Member 6910898-May-04 0:33 
GeneralRe: C# Questions relating to TextBox Pin
Hesham Amin8-May-04 1:19
Hesham Amin8-May-04 1:19 
GeneralRe: C# Questions relating to TextBox Pin
surgeproof8-May-04 4:21
surgeproof8-May-04 4:21 
GeneralRe: C# Questions relating to TextBox Pin
kayhustle8-May-04 5:19
kayhustle8-May-04 5:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.