Skip to content

PowershellFrameworkCollective/MailDaemon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

This module is a simple way to implement a mail daemon on your systems.

Ever felt it a pain to set up your mail system right? Anonymous sending is causing trouble, but you don't want to give every task user access to an account to do so? Wished it was as easy as writing a logfile and emails aren't lost during a downtime?

Then this module is for you!

Main Features

  • Centralize mail sending, with dedicated account or credentials
  • Retry sending emails when service is unavailable
  • Full logging without having to worry about the logs - never again lose a message without being able to look up why
  • Easy to setup
  • Easy to use
  • Manageable by Group Policy / SCCM / Intune / ...

Prerequisites

  • PowerShell 5.1
  • PowerShell Module: PSFramework

Installation

To install the module from the PSGallery, run this line:

Install-Module MailDaemon

Setting up the Daemon on your system:

Install-MDDaemon -SmtpServer mail.domain.com -SenderDefault '[email protected]' -RecipientDefault '[email protected]'

Setting it up an all^ machines^^:

Get-ADComputer -Filter * | Install-MDDaemon -SmtpServer mail.domain.com -SenderDefault '[email protected]' -RecipientDefault '[email protected]'

^Will copy the modules needed if not already present

^^Expect some of them to fail, due to being offline ;)

Sending Emails

Sending emails is a matter of up to three commands used during your script:

Preparing your email meta information

Can be run any number of times to later specify other information

Set-MDMail -From '[email protected]' -To '[email protected]' -Subject 'Backup Failed'

Adding content to the mail body

Can also be specified/overwritten during Set-MDMail

Add-MDMailContent "Backup on server $server failed due to $errorreason"

Submitting mail for sending

Send-MDMail -TaskName BackupTask

About

A module implementing an Email Agent

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

 

Packages

No packages published