Skip to content

Commit

Permalink
Fix casing for SmtpEncryptionMethod enum entries (#13228)
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamco committed May 29, 2023
1 parent e413227 commit 5edb686
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@
<option value="@SmtpEncryptionMethod.None" selected="@(SmtpEncryptionMethod.None == Model.EncryptionMethod ? true : false)">
@T["None"] - @T["Connect to server using insecure connection."]
</option>
<option value="@SmtpEncryptionMethod.SSLTLS" selected="@(SmtpEncryptionMethod.SSLTLS == Model.EncryptionMethod ? true : false)">
<option value="@SmtpEncryptionMethod.SslTls" selected="@(SmtpEncryptionMethod.SslTls == Model.EncryptionMethod ? true : false)">
@T["SSL/TLS"] - @T["Connect to server using SSL/TSL secure connection"]
</option>
<option value="@SmtpEncryptionMethod.STARTTLS" selected="@(SmtpEncryptionMethod.STARTTLS == Model.EncryptionMethod ? true : false)">
<option value="@SmtpEncryptionMethod.StartTls" selected="@(SmtpEncryptionMethod.StartTls == Model.EncryptionMethod ? true : false)">
@T["STARTTLS"] - @T["Connect to server using insecure connection and upgrade to secure using SSL/TLS"]
</option>
</select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace OrchardCore.Email
public enum SmtpEncryptionMethod
{
None = 0,
SSLTLS = 1,
STARTTLS = 2
SslTls = 1,
StartTls = 2
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ private async Task<string> SendOnlineMessageAsync(MimeMessage message)
secureSocketOptions = _options.EncryptionMethod switch
{
SmtpEncryptionMethod.None => SecureSocketOptions.None,
SmtpEncryptionMethod.SSLTLS => SecureSocketOptions.SslOnConnect,
SmtpEncryptionMethod.STARTTLS => SecureSocketOptions.StartTls,
SmtpEncryptionMethod.SslTls => SecureSocketOptions.SslOnConnect,
SmtpEncryptionMethod.StartTls => SecureSocketOptions.StartTls,
_ => SecureSocketOptions.Auto,
};
}
Expand Down

0 comments on commit 5edb686

Please sign in to comment.