Skip to content

Commit 33080b8

Browse files
Adding option to se SMTP Use SSL to False, default is True
1 parent 3740be3 commit 33080b8

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

ReportingServicesTools/Functions/Admin/Set-RsEmailSettings.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ function Set-RsEmailSettings
2020
.PARAMETER SmtpServer
2121
Specify the SMTP Server address.
2222
23+
.PARAMETER SMTPUseSSL
24+
Specify the the use of SSL.
25+
2326
.PARAMETER SenderAddress
2427
Specify sender email address for the email.
2528
@@ -85,6 +88,10 @@ function Set-RsEmailSettings
8588
[string]
8689
$SmtpServer,
8790

91+
[Parameter(Mandatory = $False)]
92+
[bool]
93+
$SMTPUseSSL = $true,
94+
8895
[Parameter(Mandatory = $True)]
8996
[string]
9097
$SenderAddress,
@@ -148,7 +155,7 @@ function Set-RsEmailSettings
148155

149156
try
150157
{
151-
$result = $rsWmiObject.SetAuthenticatedEmailConfiguration($true, $SmtpServer, $SenderAddress, $UserName, $Password, $Authentication.Value__, $true)
158+
$result = $rsWmiObject.SetAuthenticatedEmailConfiguration($true, $SmtpServer, $SenderAddress, $UserName, $Password, $Authentication.Value__, $SMTPUseSSL)
152159
}
153160
catch
154161
{

0 commit comments

Comments
 (0)