Digressive / HyperV-Backup-Utility

Flexible Hyper-V Backup Utility
https://gal.vin/posts/vm-backup-for-hyper-v/
MIT License
125 stars 40 forks source link

Modern powershells support the -Port argument to Send-MailMessage. #6

Closed silverl closed 3 years ago

silverl commented 3 years ago

In order to support TLS/SSL with most SMTP servers, it's necessary to specify a port. PowerShell added the -Port parameter to more recent versions of the Send-MailMessage command.

This PR adds support for the SMTP port.

This is a breaking change, as it will not work on systems that do not have the -Port argument.

It would be possible to do this with backward compatibility by checking to see if Send-MailMessage has the port parameter, using something like: ( (Get-Command Send-MailMessage).ParameterSets | Select -ExpandProperty Parameters).Name -Contains "Port"

However this would result in a messy bunch of If/Thens with three more Send-MailMessage calls to get all the permutations, and I decided not to do it.

silverl commented 3 years ago

Bump?

silverl commented 3 years ago

One more bump.

silverl commented 3 years ago

Closing, as the author is not responding.