Sending email via remote smtp ( C sharp)

Posted on 2005-05-04
Last Modified: 2008-03-17
Dear Experts,

I wish to send a confirmation email from a C sharp page to users via a remote smtp server as there is no local server in place. How can i send my log-in information, user/pwd, to the remote server to allow the connection and then send the email?

Thank you!
Question by:henrym01
    LVL 37

    Expert Comment

    MailMessage mail = new MailMessage();
    mail.To = to;
    mail.From = from;
    mail.Subject = "whatever";
    mail.Body = "test";
    SmtpMail.SmtpServer = "localhost";

    with this you can do it (setup your machine to redirect)

    or check out this
    LVL 11

    Accepted Solution

    you can not send mails using remote servers using framework classes.
    try this library:

    it is written in c# it is free and you can use remote servers.

    LVL 37

    Expert Comment

    "you can not send mails using remote servers using framework classes."

    ummm this is wrong ...


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    761 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

    11 Experts available now in Live!

    Get 1:1 Help Now