Update to MailKit 5; eliminate warnings

This commit is contained in:
danieljsummers committed 2026-11-25 08:51:15 -05:00
1 parent 27d3f80f5a
commit 2506ee4821
9 files changed
+9 -12

No files matched your search

-1
View File
@@ -5,7 +5,6 @@ open System.Threading.Tasks
open Microsoft.Extensions.Caching.Distributed
open NodaTime
open Npgsql
open Npgsql.FSharp
/// Helper types and functions for the cache
[<AutoOpen>]
+2 -2
View File
@@ -11,7 +11,7 @@
<PackageVersion Include="Giraffe.Htmx" Version="2.0.11" />
<PackageVersion Include="Giraffe.ViewEngine" Version="1.4.0" />
<PackageVersion Include="Giraffe.ViewEngine.Htmx" Version="2.0.11" />
<PackageVersion Include="MailKit" Version="4.18.2" />
<PackageVersion Include="MailKit" Version="5.0.0" />
<PackageVersion Include="Microsoft.AspNetCore.Html.Abstractions" Version="2.3.14" />
<PackageVersion Include="Microsoft.AspNetCore.Http" Version="2.3.14" />
<PackageVersion Include="Microsoft.AspNetCore.Http.Extensions" Version="2.3.14" />
@@ -22,6 +22,6 @@
<PackageVersion Include="NodaTime.Serialization.JsonNet" Version="3.3.0" />
<PackageVersion Include="NodaTime.Testing" Version="3.3.7" />
<PackageVersion Include="Npgsql.FSharp" Version="8.0.0" />
<PackageVersion Include="Npgsql.NodaTime" Version="10.0.3" />
<PackageVersion Include="Npgsql.NodaTime" Version="11.0.0" />
</ItemGroup>
</Project>
+4 -1
View File
@@ -3,7 +3,6 @@ module PrayerTracker.Email
open MailKit.Net.Smtp
open Microsoft.Extensions.Localization
open MimeKit
open PrayerTracker.Entities
/// Parameters required to send an e-mail
@@ -58,6 +57,8 @@ let getConnection () = task {
return client
}
open MimeKit
/// Create a mail message object, filled with everything but the body content
let createMessage opts =
let msg = new MimeMessage()
@@ -96,6 +97,8 @@ let createTextMessage opts =
msg.Body <- new TextPart(TextFormat.Plain, Text = bodyText)
msg
open MailKit
/// Send e-mails to a class
let sendEmails opts = task {
use htmlMsg = createHtmlMessage opts
-1
View File
@@ -68,7 +68,6 @@ type ClaimsPrincipal with
open Giraffe
open Npgsql
/// Extensions on the ASP.NET Core HTTP context
type HttpContext with
-2
View File
@@ -77,8 +77,6 @@ let edit reqId : HttpHandler = requireAccess [ User ] >=> fun next ctx -> task {
| Result.Error e -> return! e
}
open Microsoft.Extensions.Configuration
// GET /prayer-requests/email/[date]
let email date : HttpHandler = requireAccess [ User ] >=> fun next ctx -> task {
let s = ctx.Strings
-1
View File
@@ -241,7 +241,6 @@ let savePreferences : HttpHandler = requireAccess [ User ] >=> validateCsrf >=>
open Giraffe.ViewEngine
open PrayerTracker.Views.CommonFunctions
open Microsoft.Extensions.Configuration
// POST /small-group/announcement/send
let sendAnnouncement : HttpHandler = requireAccess [ User ] >=> validateCsrf >=> fun next ctx -> task {
+1 -1
View File
@@ -9,6 +9,6 @@ let _s =
let asm = typeof<Common>.Assembly.GetName().Name
let opts =
{ new IOptions<LocalizationOptions> with
member __.Value with get () = LocalizationOptions (ResourcesPath = "Resources")
member _.Value with get () = LocalizationOptions (ResourcesPath = "Resources")
}
ResourceManagerStringLocalizerFactory(opts, new NullLoggerFactory ()).Create("Common", asm)
+1 -2
View File
@@ -3,7 +3,6 @@ module PrayerTracker.Views.Help
open System.IO
open Giraffe.ViewEngine
open PrayerTracker.ViewModels
/// The help index page
let index () =
@@ -286,7 +285,7 @@ module User =
/// Change Your Password
let password () =
let s = I18N.localizer.Force()
let _ = I18N.localizer.Force()
let l = I18N.forView "Help/User/Password"
use sw = new StringWriter()
let raw = rawLocText sw
+1 -1
View File
@@ -619,7 +619,7 @@ let preferences (model : EditPreferences) ctx viewInfo =
]
p [] [
rawText "*** "
raw l["If you want a custom color, you may be able to get some ideas (and a list of RGB values for those colors) from the W3 School's <a href=\"http://www.w3schools.com/html/html_colornames.asp\" title=\"HTML Color List - W3 School\">HTML color name list</a>."]
raw l["If you want a custom color, you may be able to get some ideas (and a list of RGB values for those colors) from the W3 School's <a href=\"https://www.w3schools.com/html/html_colornames.asp\" title=\"HTML Color List - W3 School\">HTML color name list</a>."]
]
]
|> Layout.Content.standard