Wednesday, August 7, 2019

How to set up DevNull SMTP Server for your development and testing environment

Hi,

In this post we are going to see how to install a DevNull SMTP server for our development/testing environment...

Many of us as developers would always encounter a situation during development/testing, the mailing feature of the application. We have different ways of setting up SMTP Server locally but those are very time consuming or the server package would require a lot of configuration to be done.

But with DevNull it will be like a cake walk to have SMTP server installed locally with minimal or no configurations.

For details you can refer the following site to have more details about DevNull

Official Site of DevNull

Let us go straight into the business of installing DevNull SMTP server in our development/testing environment

1. Installation
1. Please download DevNull SMTP server package using the link given below and hold it in your preferred location.

Direct Link : Download DevNull SMTP Server

2. Open an terminal and navigate to the folder where you have downloaded DevNull server package

3. At the prompt, fire the command as given below...
> java -jar DevNullSmtp.jar

2. Usages

Graphical User Interface Option
If you want the Graphical User Interface along with SMTP server, then fire the command below
> java -jar DevNullSmtp.jar

the result of the command execution would result something like the image given below...


the GUI has three important parts to be talked about....

1. The Listening PORT
2. Control to start the server
3. Place holder to save  the mail messages

The port and place holder items are configurable and we can change that anytime according to our needs.

The default port is "25", in order to have the server run make sure you do not have any service running at port 25, if you have then change the port value of DevNull SMTP Server to any other value other than "25" eg "2025"

Console Option

DevNull provides another option to have the server run as console application, to achieve that run the following command at the prompt..
> java -jar DevNullSmtp.jar -console

The above command comes with a variety of switches whose discription is given below...

'-d' switch : Holds domain names from where the email comes

'-p' switch : Holds the port value of the server

'-s' switch : Holds the location where mail messages are stored.

'-h' switch : List the options with its descriptions.

Command with '-d' Switch
> java -jar DevNullSmtp.jar -console -d first.com, second.com

Command with '-p' Switch
> java -jar DevNullSmtp.jar -console -p 2025

the '-h' option would list down all the options that server contains...
> java -jar DevNullSmtp.jar -h

Well this concludes the installation of DevNull SMTP Server

Hope you had good time reading it.

Thanks.

No comments:

Post a Comment

Addressing Modes of 8080 / 8085 MicroProcessor

Hi,   In this post I am going to talk about different addressing modes of 8080/8085...without much talking let us get into the topic.   Ther...