GithubHelp home page GithubHelp logo

cct-tnakashita / smtp4dev Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rnwood/smtp4dev

0.0 0.0 0.0 20.09 MB

smtp4dev - the mail server for development

License: BSD 3-Clause "New" or "Revised" License

C# 48.06% TypeScript 31.24% Scilab 1.93% HTML 13.60% CSS 1.68% JavaScript 3.40% PowerShell 0.10%

smtp4dev's Introduction

smtp4dev

smtp4dev - the mail server for development

A dummy SMTP server for Windows, Linux, Mac OS-X (and maybe elsewhere where .NET Core is available).

This repository hosts the development of v3 which has a web UI so that it can be shared amongst members of a team, and be available cross platform. This version is in development, but now approaching a stable state.

If you're looking for the older v2 Windows GUI version. Grab it here.

If you find smtp4dev useful, please consider supporting further development by making a donation:

Donate

Build status Github Releases (+270k when prev hosted on Codeplex)

Screenshots

Screenshot 1 Screenshot 2

How to run smtp4dev by downloading from github releases

The MacOS release is totally untested. Please contribute instructions on how to use and feedback on any issues

  • Download a release and unzip.

  • On Linux chmod +x the Rnwood.Smtp4dev file to make it executable

  • Edit appsettings.json and set the port number you want the SMTP server to listen on.

  • Run Rnwood.Smtp4dev (.exe on Windows). (If you downloaded the noruntime version, you need the .NET Core 2.0 runtime on your machine and you should execute dotnet Rnwood.Smtpdev.dll to run it.)

  • Open your browser at http://localhost:5000 (to run the web server on a different port or make it listen on interfaces other than loopback, add the command line arg --server.urls "http://0.0.0.0:5001/" when starting the executable.

  • Now configure your apps which send mail, to use the SMTP server on the machine where SMTP4dev is running (localhost if they are on the same machine), and using the port you selected (25 by default).

How to run smtp4dev as a dotnet global tool

If you're using the .NET Core SDK 2.2 or greater, you can install smtp4dev as a global tool using the following command:

dotnet tool install -g Rnwood.Smtp4dev --version "3.1.0-*"

Then you can start smtp4dev by running

smtp4dev

How to run smtp4dev in Docker

Docker images for both Windows and Linux are available. To run with the web interface on port 3000 and SMTP on port 2525:

Linux or Linux Containers on Windows/Other-OSs:

docker run -p 3000:80 -p 2525:25 rnwood/smtp4dev:linux-amd64-v3

Windows:

docker run -p 3000:80 -p 2525:25 rnwood/smtp4dev:windows-amd64-v3

Sorry no unified cross platform image tag available yet. To see the full list of available tags see the Docker hub page for smtp4dev.

How to run smtp4dev as a service (Windows only)

A service in Windows can be installed using New-Service in PowerShell, or sc in both command line or PowerShell. If you use sc in PowerShell, it must be run as sc.exe. sc is an alias for Set-Content.

Install service in PowerShell

New-Service -Name Smtp4dev -BinaryPathName "{PathToExe} --service"

Install service in Cmd or PowerShell

sc.exe create Smtp4dev binPath= "{PathToExe} --service"

Configuration

Changing how many messages or sessions are kept

smtp4dev keeps the latest 100 messages and 100 sessions by default. The --messagestokeep X and --sessionstokeep X command line options can override this.

Changing where the database file is saved

By default smtp4dev will create a Sqlite DB named database.db in application root direction when it runs.

To change the path of this file use the --db "/path/to/file.db" command line option or edit ServerOptions\Database in appsettings.json

To use an in memory DB use an empty string (e.g. --db="")). All session and messages will be lost when the process exits. (Docker: The = in the example is important as Docker will eat the empty quotes if ommitted.)

Changing the SMTP port

smtp4dev listens on 0.0.0.0 (all interfaces) port 25 by default. To change this either edit ServerOptions\Port in the appsettings.json before startup or add the --smtpport command line options (e.g. --smtpport 2525).

smtp4dev's People

Contributors

rnwood avatar dbarkwell avatar opvolger avatar dependabot-support avatar khaledosman avatar lennartvdd avatar matt0x5b avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.