How to Check if Email Host is Available

How to check if email host is available?

Follow the below Steps :

  • Method 1
    <ol><li>Open up a command prompt (CMD.exe)</li><li>Type&nbsp;<code>nslookup</code>&nbsp;and hit enter</li><li>Type&nbsp;<code>set type=MX</code>&nbsp;and hit enter</li><li>Type the domain name and hit enter, for example:&nbsp;<a href="" target="_blank"></a></li><li>The results will be a list of host names that are set up for SMTP</li></ol>

                     If no answer is received from DNS server, there is a good chance that there is no SMTP Servers set up for that domain.

    • Method 2
      	<p>Generally SMTP servers name are&nbsp;<a href="" target="_blank"></a>&nbsp;or&nbsp;<a href="" target="_blank"></a>&nbsp;, Open command prompt and try to run following two commands</p>
      	<ol><li><code>&gt;ping&nbsp;<a href="" target="_blank"></a></code></li><li><code>&gt;ping&nbsp;<a href="" target="_blank"></a></code></li></ol>
      </li><li><strong><strong><strong>Method 3</strong></strong></strong>
      	<p>Telnet to SMTP&nbsp;server like</p>
      	<pre><code>telnet 25

      	<p>Syntax :</p>
      	<pre><code>telnet {smtp_domain_name} {port_number}

      	<p>And copy and paste the below</p>

      mail from:<>
      rcpt to:<>
      Subject: test mail from command line

      this is test number 1
      sent from linux box

      	<p><strong>Note :</strong>&nbsp;Do not forgot the "." at the end which represents the end of the message</p>
      </li><li><strong><strong><strong>Powershell commands to send Email</strong></strong></strong>
      <ul><li>$From = "YourEmail@<a href="" target="_blank"></a>"<br>		$To = "<a href="" target="_blank"></a>"<br>		$Cc = "YourBoss@<a href="" target="_blank"></a>"<br>		$Attachment = "C:\temp\Some random file.txt"<br>		$Subject = "Email Subject"<br>		$Body = "Insert body text here"<br>		$SMTPServer = "<a href="" target="_blank"></a>"<br>		$SMTPPort = "587"<br>		Send-MailMessage -From $From -to $To -Cc $Cc -Subject $Subject `<br>		-Body $Body -SmtpServer $SMTPServer -port $SMTPPort -UseSsl `<br>		-Credential (Get-Credential) -Attachments $Attachment</li></ul>