Skip to content

Instantly share code, notes, and snippets.

@jennings
Created January 16, 2019 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jennings/09f2ce2ccfb04d452808a994a3cbe7cb to your computer and use it in GitHub Desktop.
Save jennings/09f2ce2ccfb04d452808a994a3cbe7cb to your computer and use it in GitHub Desktop.
Installs the Papercut SMTP Server
# Using 5.1.23 because 5.1.70 has a bug that prevents the GUI from opening
$tag = "5.1.23"
$downloadUrl = "https://github.com/ChangemakerStudios/Papercut/releases/download/$tag/Papercut.Setup.exe"
$outputFileName = "$($env:TEMP)\Papercut.Setup.exe"
# Download
del $outputFileName -Force -ErrorAction SilentlyContinue
Invoke-WebRequest $downloadUrl -OutFile $outputFileName
# Install
& $outputFileName /install /passive
# Set to delayed automatic start, then start the background service
sc.exe config PapercutServerService start= delayed-auto
net start PapercutServerService
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment