On Wed, 22 Oct 2008 07:11:02 -0700, rodchar
<ro*****@discussions.microsoft.comwrote:
hey all,
i have a console application that uses the console to display message
status
of my process. what's the best way (low impact) to get the messages as
they
are now into an email?
Redirect the output to a file and then send the file as email.
Depending on how you're trying to do this, you can accomplish it
programmatically. If you want to accomplish it from without the console
application, you can use the Process class to run your console
application, redirect the output and just write it to a memory data
structure (String, MemoryStream, whatever), and then use the Smtp class to
send the email.
If you want to accomplish it from within the console application itself,
then you might find that using Console.SetOut() to specify your own
TextWriter to write to a memory data structure as above, and then using
the Smtp class would work.
Pete