Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Error : You Should Authenticate first

Error : You Should Authenticate first

Scheduled Pinned Locked Moved ASP.NET
tutorialcsharpasp-netcomhelp
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Krazy Programmer
    wrote on last edited by
    #1

    Hello friends I am trying to send mail in asp.net when it is from Example ... abcd@example.com to efgh@example.com it is reaching perfectly but whenever i send mail to different id like yahoo error is coming as You should authenticate first... Please explain how to make it work on other id's too Thank You

    Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.

    E 1 Reply Last reply
    0
    • K Krazy Programmer

      Hello friends I am trying to send mail in asp.net when it is from Example ... abcd@example.com to efgh@example.com it is reaching perfectly but whenever i send mail to different id like yahoo error is coming as You should authenticate first... Please explain how to make it work on other id's too Thank You

      Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.

      E Offline
      E Offline
      eyeseetee
      wrote on last edited by
      #2

      Can you give us a bit more detail about what you are doing: Is it a localhost or web server? Whats the full error message? Have you tested many other e-mail address?

      K 1 Reply Last reply
      0
      • E eyeseetee

        Can you give us a bit more detail about what you are doing: Is it a localhost or web server? Whats the full error message? Have you tested many other e-mail address?

        K Offline
        K Offline
        Krazy Programmer
        wrote on last edited by
        #3

        i have tested it on the local server ... and code is System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(); message.From = new MailAddress("abcd@example.com"); message.To.Add(new MailAddress("mr.abcd@yahoo.com")); message.Subject = "This is my subject"; message.Body = "This is a test message"; SmtpClient client = new SmtpClient(); client.Send(message);

        Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.

        E S 2 Replies Last reply
        0
        • K Krazy Programmer

          i have tested it on the local server ... and code is System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(); message.From = new MailAddress("abcd@example.com"); message.To.Add(new MailAddress("mr.abcd@yahoo.com")); message.Subject = "This is my subject"; message.Body = "This is a test message"; SmtpClient client = new SmtpClient(); client.Send(message);

          Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.

          E Offline
          E Offline
          eyeseetee
          wrote on last edited by
          #4

          Is the server inside a local network? First test if you can send e-mails to a local address then test sending e-mails to outside addresses like yahoo, hot mail etc it could be that your mail server isnt yet set up to send e-mail to those types of addresses

          K 1 Reply Last reply
          0
          • E eyeseetee

            Is the server inside a local network? First test if you can send e-mails to a local address then test sending e-mails to outside addresses like yahoo, hot mail etc it could be that your mail server isnt yet set up to send e-mail to those types of addresses

            K Offline
            K Offline
            Krazy Programmer
            wrote on last edited by
            #5

            ok...actually i dont know how to setup mail server to send mails to different server

            Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.

            E 1 Reply Last reply
            0
            • K Krazy Programmer

              ok...actually i dont know how to setup mail server to send mails to different server

              Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.

              E Offline
              E Offline
              eyeseetee
              wrote on last edited by
              #6

              I think there are plenty of articles on the net that will help you

              1 Reply Last reply
              0
              • K Krazy Programmer

                i have tested it on the local server ... and code is System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(); message.From = new MailAddress("abcd@example.com"); message.To.Add(new MailAddress("mr.abcd@yahoo.com")); message.Subject = "This is my subject"; message.Body = "This is a test message"; SmtpClient client = new SmtpClient(); client.Send(message);

                Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.

                S Offline
                S Offline
                Sankar Komma
                wrote on last edited by
                #7

                Try with the same code.. System.Net.Mail.MailMessage objEmail = new System.Net.Mail.MailMessage(From, To); objEmail.Subject = "Subject"; objEmail.Body = "Body"; objEmail.IsBodyHtml = true; System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient(); client.Host = "smtp.orgname.com"; client.UseDefaultCredentials = false; System.Net.NetworkCredential auth = new System.Net.NetworkCredential(From, "P@ssw0rd"); client.Credentials = auth; client.Send(objEmail); In the above code client.Host = "smtp.example.com" where example is abcd@example.com.

                smile :-)

                F 1 Reply Last reply
                0
                • S Sankar Komma

                  Try with the same code.. System.Net.Mail.MailMessage objEmail = new System.Net.Mail.MailMessage(From, To); objEmail.Subject = "Subject"; objEmail.Body = "Body"; objEmail.IsBodyHtml = true; System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient(); client.Host = "smtp.orgname.com"; client.UseDefaultCredentials = false; System.Net.NetworkCredential auth = new System.Net.NetworkCredential(From, "P@ssw0rd"); client.Credentials = auth; client.Send(objEmail); In the above code client.Host = "smtp.example.com" where example is abcd@example.com.

                  smile :-)

                  F Offline
                  F Offline
                  flash665
                  wrote on last edited by
                  #8

                  you should have some config in web.config for the post email's smtp,username,password! like this: <configuration> <system.net> <mailSettings> <smtp from="xxx@xx.com"> <network host="mail.xxx.net" password="xxx" port="25" userName="webmaster" defaultCredentials="false"/> </smtp> </mailSettings> </system.net> </configuration>

                  I love li li huang , ha ha , but you don't who is she!

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups