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. How do I authenticate that username,password or smtpserver is wrong in mail smpt server

How do I authenticate that username,password or smtpserver is wrong in mail smpt server

Scheduled Pinned Locked Moved ASP.NET
questionsysadminhelp
4 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.
  • S Offline
    S Offline
    Samarjeet Singh india
    wrote on last edited by
    #1

    Hi All, In my website there is facility that user can send mail using it own email SMTP setting. some user is sending mail success fully but some facing problem for this there is option in config page in which user have to enter his SMTP setting. And also there is test button when users press a test button and if any wrong entry (username, password, smtpServer) then I want to show pop message accordingly. Is any way in which we can identified that what is wrong entry (username, password or mail server) because I want to give message like "wrong username or wrong SMTP server? Thanks

    N T R 3 Replies Last reply
    0
    • S Samarjeet Singh india

      Hi All, In my website there is facility that user can send mail using it own email SMTP setting. some user is sending mail success fully but some facing problem for this there is option in config page in which user have to enter his SMTP setting. And also there is test button when users press a test button and if any wrong entry (username, password, smtpServer) then I want to show pop message accordingly. Is any way in which we can identified that what is wrong entry (username, password or mail server) because I want to give message like "wrong username or wrong SMTP server? Thanks

      N Offline
      N Offline
      Not Active
      wrote on last edited by
      #2

      There isn't really anyway to check. For instance, in a hosting environment two SMTP servers could be 10.54.16.10 and 10.54.16.20. If they enter the former when they should using the latter, how can tell the difference? It is a valid address, just the not the correct one for them.


      I know the language. I've read a book. - _Madmatt

      1 Reply Last reply
      0
      • S Samarjeet Singh india

        Hi All, In my website there is facility that user can send mail using it own email SMTP setting. some user is sending mail success fully but some facing problem for this there is option in config page in which user have to enter his SMTP setting. And also there is test button when users press a test button and if any wrong entry (username, password, smtpServer) then I want to show pop message accordingly. Is any way in which we can identified that what is wrong entry (username, password or mail server) because I want to give message like "wrong username or wrong SMTP server? Thanks

        T Offline
        T Offline
        T M Gray
        wrote on last edited by
        #3

        Send a test message and catch SmtpException and check the SmtpStatusCode.

        1 Reply Last reply
        0
        • S Samarjeet Singh india

          Hi All, In my website there is facility that user can send mail using it own email SMTP setting. some user is sending mail success fully but some facing problem for this there is option in config page in which user have to enter his SMTP setting. And also there is test button when users press a test button and if any wrong entry (username, password, smtpServer) then I want to show pop message accordingly. Is any way in which we can identified that what is wrong entry (username, password or mail server) because I want to give message like "wrong username or wrong SMTP server? Thanks

          R Offline
          R Offline
          Rajendra Prasad Panchati
          wrote on last edited by
          #4

          Hi Samarjeet, If you give wrong server entry, however It'll give an error like "Relay access denied on 5.7.xx" like that and if u give a wrong credentials it'll throw an error like "Could not connect to the host...". From these errors you can show your custom message to the user. I hope u understand it :thumbsup:.

          Rajendra Prasad Panchati .Net/Sharepoint Software Enginner, Hyderabad.

          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