About SMTP server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • manivelk
    New Member
    • Jan 2008
    • 21

    About SMTP server

    Hi,

    I have a query about SMTP server. I want to know how to use the SMTP mail server in my C#.Net project.. i need the reference files, settings and sample codings.. Please help me out..
    Thanks in Advance..
    Manivel . K
  • wimpos
    New Member
    • Jan 2008
    • 19

    #2
    Originally posted by manivelk
    Hi,

    I have a query about SMTP server. I want to know how to use the SMTP mail server in my C#.Net project.. i need the reference files, settings and sample codings.. Please help me out..
    Thanks in Advance..
    Manivel . K
    Do you want to setup a mailserver? Or do you want to send mails from your application?

    In C# .net there is some namespaces you need to use for sending mails:
    Code:
    System.Net.Mail;
    System.Net.Mail.SmtpClient;
    System.Net.MailMessage;
    
    MailMessage myMessage = new MailMessage(sender, recipient);
    myMailMessage.Subject = "testMail";
    
    SmtpClient myServer = new SmtpClient(server);
    myServer.Credentials = new System.Net.NetworkCredential(user, pass);
    
    myServer.Send(myMessage);
    You should be able to figure out the details using the msdn website.

    see also: http://www.thescripts.com/forum/thread766490.html

    KR
    W

    Comment

    • kenobewan
      Recognized Expert Specialist
      • Dec 2006
      • 4871

      #3
      Please do not post the same question in multiple forums. Make sure you read the Posting Guidelines. Thanks.

      MODERATOR

      Comment

      • manivelk
        New Member
        • Jan 2008
        • 21

        #4
        Hi,

        Thanks for your reply.. i want to send mail from my applications. how to send a mail from my applications..

        Please help me out..

        Thanks in advance..

        Manivel. K

        Comment

        Working...