Configuring SMTP Server

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Paridevi
    New Member
    • Feb 2008
    • 15

    Configuring SMTP Server

    Hai ,
    i Want to know how to configure SMTP Server with localhost to test sendmail within localhost.pls any one help me how to configure this.thanks in advance
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Does your pc that it will run on have an SMTP server installed that it can respond to the .NET SMTPClient stuff?
    What are you trying to configure? And where?

    Comment

    • Paridevi
      New Member
      • Feb 2008
      • 15

      #3
      Originally posted by Plater
      Does your pc that it will run on have an SMTP server installed that it can respond to the .NET SMTPClient stuff?
      What are you trying to configure? And where?
      i am using vb .net 2003. i want to send email in my project.i am having my client smtpserver name. i have no idea about how to install SMTPServer and how to configure the client SMPTServer name in my code to send mail. please help me. this is very urgent.i attach my code hear;

      Dim MailServer as string
      dim strSubject as string
      strSubject = "Acknowledgemen t"

      MailMessage msg = new MailMessage()
      msg.To = "devi@rediffmai l.com" ' To Address
      msg.From = "muthu@rediffma il.com" ' From Address
      msg.Subject = "Test mail" ' Subject of the mail
      msg.Body = "Hi How are you?" ' Type your message
      msg.Priority = MailPriority.Hi gh ' Set the mail priority
      msg.BodyFormat = MailFormat.Html ' MailFormat Html or Plain Text
      SmtpMail.SmtpSe rver = MailServer ' Set the Mail server
      try
      {
      SmtpMail.Send(m sg)
      }
      catch (Exception e)
      {
      lblErrorMsg.Tex t = "an error occured in sending the mail! pls
      check your id"
      }

      Comment

      • Paridevi
        New Member
        • Feb 2008
        • 15

        #4
        Originally posted by manovich
        Try to use this trick on your dev environment - How to check email works without using SMTP.

        Does this code work in .Net 2003 + .net Framework 1.1 .please reply me soon.
        Thanks in advance

        regards
        pari

        Comment

        • srikanth reddy
          New Member
          • Feb 2008
          • 22

          #5
          hai paridevi....... .......



          Note:- Button Click Code


          Import System.web(net) .mail;

          dim obj as new mailmessage;

          obj.to=textbox1 .Text;
          obj.from=textbo x2.Text;
          obj.subject=tex tbox3.Text;
          obj.priority=ma ilpriority.high ;
          obj.bodyformat= mailformat.html ;
          obj.message=tex tbox4.Text;
          smtpmail.smtpse rver="192.168.0 .201" ; note:- server Address

          smtpmail.send(o bj);

          Comment

          • Paridevi
            New Member
            • Feb 2008
            • 15

            #6
            Originally posted by srikanth reddy
            hai paridevi....... .......



            Note:- Button Click Code


            Import System.web(net) .mail;

            dim obj as new mailmessage;

            obj.to=textbox1 .Text;
            obj.from=textbo x2.Text;
            obj.subject=tex tbox3.Text;
            obj.priority=ma ilpriority.high ;
            obj.bodyformat= mailformat.html ;
            obj.message=tex tbox4.Text;
            smtpmail.smtpse rver="192.168.0 .201" ; note:- server Address

            smtpmail.send(o bj);
            i tried this code, how can i check that mail has been sent of not using localhost ip address.please tell me.

            Comment

            Working...