Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 255551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:56:24+00:00 2026-05-11T21:56:24+00:00

I am working on a project where I have to validate the given SMTP

  • 0

I am working on a project where I have to validate the given SMTP server i.e in a textbox user will provide the detail and then he will click on a test button. I want to check whether the server entered by the user is an Smtp Server or not?

Any Idea??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T21:56:25+00:00Added an answer on May 11, 2026 at 9:56 pm

    Attempt to connect to the SMTP port, and ensure you get a line back from it that starts with “220 ” and contains the letters “SMTP”. A typical example response would be:

    220 prod.monadic.cynic.net ESMTP Postfix (2.5.5)
    

    Then be polite and send “QUIT\r\n” to hang up.

    You can do some further testing, if you like, such as testing that the user can likely deliver messages. For this, you’d send a HELO command with your hostname (or any string, really), a MAIL FROM command using the user’s e-mail address, and a RCPT TO:<example@example.com>. Most servers at that point will tell you if relaying is not allowed. (I’m assuming you’re doing this from the computer from which you will later be sending mail.) So long as you QUIT after that, rather than issuing a DATA command and
    the message data, nothing will be sent.

    Here’s an example session, done from the shell using the “netcat” command, showing that my server exists, but will not relay mail for people from random IP addresses.

        $ nc prod.monadic.cynic.net. 25
        220 prod.monadic.cynic.net ESMTP Postfix (2.5.5)
        HELO cynic.net
        250 prod.monadic.cynic.net
        MAIL FROM:<cjs@cynic.net>
        250 2.1.0 Ok
        RCPT TO:<example@example.com>
        554 5.7.1 <example@example.com>: Relay access denied
        QUIT
        221 2.0.0 Bye
        $
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have project that I'm working on that is going to require a webserver.
I'm working on a project where I have 2 web services that need the
On a recent project I have been working on in C#/ASP.NET I have some
I'm working on a project were we have number (5 at the moment) of
I am working a project that does not have a trunk / branches /
One long term project I have is working through all the exercises of SICP.
I'm currently working on project with Haskell, and have found myself some trouble. I'm
I am about to start a web project and have been working almost exclusively
Working on a project at the moment and we have to implement soft deletion
I have a project that I'm working on and I need to be able

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.