Sending an email from .net remoting software

Hi All,
I am asking this question for my development team.  We have created a .net remoting application in C#.  We have a server manager and a thick client.  The server manager currently communicates with the SQL server and the accounting software.  The development team would like to have the application create and send an email automatically after the user clicks accept on one of the winforms. THey do not want Outlook or any other email client to be displayed.  This should completely happen in the background.  The address of the recipient will be setup on one of the other winforms.  So here are my questions...

1.  How can this be done?  Is there an object in VS 2003 that is already capable of doing this?

2.  SHould the client or the server manager create and send the email?

3.  Does Microsoft Exchange or another email system need to be available on the LAN or can the application send the email directly to the email recipient's email server.

I am sure that this is not as easy as I am making it out to be.  But I am looking for some information so that my development team can begin the process of adding this component.

Any help would be  greatly appreciated.

Scott

smprossAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

anand2kCommented:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
smprossAuthor Commented:
Anand,
I would like to have the system send the email without any user interation.  The email should be send without displaying a GUI.

Any suggestions?

Scott
CynergySoftwareCommented:
in it's simplest form here.

using System.Net.Mail;

MailMessage mail = new MailMessage(fromAddress, toAddress);
try
{                      
            mail.Subject = "Subject Here";
            mail.IsBodyHtml = true; // true/false value
            mail.Priority = MailPriority.Normal;
            mail.Body = "Body Message"
            SmtpClient mailClient = new SmtpClient(mailServer);
            mailClient.Send(mail);
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
        }
        finally
        {
            mail = null;
        }
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.