Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix casing for SmtpEncryptionMethod enum entries #13228

Merged
merged 1 commit into from
May 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)">
hishamco marked this conversation as resolved.
Show resolved Hide resolved
@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 @@ -277,8 +277,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