Easiest way to send a test email from a server, to test settings?

Your best, easiest and most globally available tool: telnet

  1. At command prompt, type: telnet mail.mailserver.com 25
  2. Type EHLO , and then press ENTER.
  3. Type AUTH LOGIN. The server responds with an encrypted prompt for your user name.

    Enter your user name encrypted in base 64. You can use one of several tools that are available to encode your user name.

    The server responds with an encrypted base 64 prompt for your password. Enter your password encrypted in base 64.

  4. Type MAIL FROM:, and then press ENTER. If the sender is not permitted to send mail, the SMTP server returns an error.

  5. Type RCPT TO:,and then press ENTER.If the recipient is not a valid recipient or the server does not accept mail for this domain, the SMTP server returns an error.

  6. Type DATA.

    If desired, type message text, press ENTER, type a period (.), and then press ENTER again.

    If mail is working properly, you should see a response similar to the following indicating that mail is queued for delivery:

    250 2.6.0 [email protected].

Quoted in part from this MS Technet article


For me, the easiest method is using Send-MailMessage in Powershell. From the Powershell console simply run:

PS C:\Users\admin> Send-MailMessage -SMTPServer smtp.domain.com -To [email protected] -From [email protected] -Subject "This is a test email" -Body "Hi, this is a test email sent via PowerShell to test the STMP relay server"

Loads more options can be found on this link:


If this is something that you have to test once in a while, or just for a small number of SMTP servers, then telnet may be the most convenient tool, as it has been pointed out. The best thing about telnet is that it's an almost universal tool, and that it allows you not only to test an SMTP server but also other services like POP, IMAP, etc.

However, if you're performing this tests regularly or on a bigger scale, i'd highly recommend using swaks. It's extremely easy to use and can also perform other tasks like sending attached files (which can be useful for testing your mail content filters).

It will also give you useful exit codes, so that you can even use it to perform automated tests.

I use it frequently on Linux, but being a Perl script, you should be able to run it on a Windows box without any problems.


If you don't want to manually run through the entire SMTP transaction you can use a command line tool such as blat to send emails.