This post is part of series starting here. Here’s how I configure my mailers in a ASP.Net Core project developed in F#. I define an interface: type IMailer = // to * subject * body abstract Send: string * string * string -> unit of which I have 2 implementation. The first one is for development as it simply prints the mail on the server’s standard output: type ConsoleMailer() = interface IMailer with member _.
This post is part of series starting here. Sending the mail Sending the mail is not hard, but will show how code running at the client side can call RPC functions provided by the server. These calls are totally transparent. For the login page, we add an endpoint: | [<EndPoint "/l">] Login and map it to a function all as seen earlier: Application.MultiPage (fun ctx endpoint -> match endpoint with | EndPoint.
Intro I had the need recently to provide some admin access to a web application, but adding password management in that application was not worth the trouble. It was much easier to allow users to request a authentication link by email, as this post will show. The web app is dveloped in WebSharper. If you’re a F# developed, you should really check it out! I like that I can develop client and server in one integrated code base, all in F#.