Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move info to Github wiki and reference from README.
- Loading branch information
Showing
2 changed files
with
49 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,25 @@ | ||
# <img src='Rnwood.Smtp4dev/ClientApp/public/logo.png' alt='logo'/> | ||
smtp4dev - the fake SMTP email server for development and testing. | ||
**smtp4dev - the fake SMTP email server for development and testing.** | ||
|
||
A dummy SMTP server for Windows, Linux, Mac OS-X (and maybe elsewhere where .NET Core is available). Lets you test your application without spamming your real customers and without needing to set up a complicated real email server with a special configuration. Messages received in smtp4dev can be viewed and inspected. | ||
|
||
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](https://github.com/rnwood/smtp4dev/releases/tag/v2.0.10).* | ||
|
||
**If you're looking for the older v2 Windows GUI version. [Grab it here](https://github.com/rnwood/smtp4dev/releases/tag/v2.0.10).** | ||
> <a style="float: right" href="https://www.patreon.com/bePatron?u=38204828" data-patreon-widget-type="become-patron-button"><img alt='Become a Patreon' src='https://c5.patreon.com/external/logo/become_a_patron_button.png' height="30px"></a> <a style="float: right" href='https://www.paypal.me/rnwood'><img alt='Donate' src='https://www.paypalobjects.com/webstatic/en_US/btn/btn_donate_pp_142x27.png'/></a> *If you find smtp4dev useful, please consider supporting further development by making a donation* | ||
> . | ||
*If you find smtp4dev useful, please consider supporting further development by making a donation:* | ||
|
||
<a href="https://www.patreon.com/bePatron?u=38204828" data-patreon-widget-type="become-patron-button"><img alt='Become a Patreon' src='https://c5.patreon.com/external/logo/become_a_patron_button.png'></a> | ||
<a href='https://www.paypal.me/rnwood'><img alt='Donate' src='https://www.paypalobjects.com/webstatic/en_US/btn/btn_donate_pp_142x27.png'/></a> | ||
## Getting Started | ||
[Installation Instructions](https://github.com/rnwood/smtp4dev/wiki/Installation) | ||
|
||
[Configuration](https://github.com/rnwood/smtp4dev/wiki/Configuration) | ||
|
||
[Configuring your programs to send mails to smtp4dev](https://github.com/rnwood/smtp4dev/wiki/Configuring-Clients) | ||
|
||
[![Build Status](https://dev.azure.com/smtp4dev/smtp4dev/_apis/build/status/rnwood.smtp4dev?branchName=master)](https://dev.azure.com/smtp4dev/smtp4dev/_build/latest?definitionId=2&branchName=master) | ||
[![Github Releases](https://img.shields.io/github/downloads/rnwood/smtp4dev/latest/total.svg)](https://github.com/rnwood/smtp4dev/releases) (+270k when prev hosted on Codeplex) | ||
|
||
## Screenshots | ||
|
||
![Screenshot 1](screenshot1.png) | ||
![Screenshot 2](screenshot2.png) | ||
|
||
|
||
## 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](https://github.com/rnwood/smtp4dev/releases) 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 3.1 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 3.1 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: | ||
|
||
``` | ||
docker run -p 3000:80 -p 2525:25 rnwood/smtp4dev:v3 | ||
``` | ||
This is a cross platform tag which will work on either Windows or Linux. To see the full list of available tags [see the Docker hub page for smtp4dev](https://hub.docker.com/r/rnwood/smtp4dev/tags/). | ||
|
||
The folder ``/smtp4dev`` will be used for the database and auto-generated TLS certificate. You can mount a directory outside of the container here for peristent storage. | ||
|
||
## 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. | ||
|
||
## How to run smtp4dev in Windows IIS | ||
|
||
Download a smtp4dev release and unzip. You must pick the win-x64 version. | ||
|
||
Create a site in IIS and set the path to where you unzipped smtp4dev. You can also host in a virtual directory under another site, but don't forget to convert the directory to an application. | ||
|
||
Grant permission to the IIS app pool to read and modify the files. The principal name is `IIS APPPOOL\<name>` where `<name>` is the name of the app pool, which is the name of the site you created unless you changed something. | ||
|
||
Edit the application pool and set '.NET CLR version' to 'No managed code' | ||
|
||
You can then access the site via the ports/hostname set in bindings that are set in IIS. If you see an error check the `Application` event log for details and you'll see any errors output from IIS. | ||
|
||
### 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 | ||
|
||
smtp4dev configuration can be performed via `appsetting.json` file, environment variables and command line arguments. Run smtp4dev with `--help` for information or see the `appsettings.json` file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters