Rhetos.SimpleSPRTEmail
6.0.0
Prefix Reserved
dotnet add package Rhetos.SimpleSPRTEmail --version 6.0.0
NuGet\Install-Package Rhetos.SimpleSPRTEmail -Version 6.0.0
<PackageReference Include="Rhetos.SimpleSPRTEmail" Version="6.0.0" />
<PackageVersion Include="Rhetos.SimpleSPRTEmail" Version="6.0.0" />
<PackageReference Include="Rhetos.SimpleSPRTEmail" />
paket add Rhetos.SimpleSPRTEmail --version 6.0.0
#r "nuget: Rhetos.SimpleSPRTEmail, 6.0.0"
#:package Rhetos.SimpleSPRTEmail@6.0.0
#addin nuget:?package=Rhetos.SimpleSPRTEmail&version=6.0.0
#tool nuget:?package=Rhetos.SimpleSPRTEmail&version=6.0.0
SimpleSPRTEmail
SimpleSPRTEmail is a plugin package for Rhetos development platform. It allows sending simple emails on "Send password reset token" authentication service method at AspNetFormsAuth.
Installation and configuration
Installing this package to a Rhetos application:
- Add "Rhetos.SimpleSPRTEmail" NuGet package, available at the NuGet.org on-line gallery.
Connecting to an SMTP email server
SimpleSPRTEmail uses System.Net.Mail
classes from .NET Framework for sending an email to an SMTP server.
Specify SMTP configuration in the application's configuration file (for example, in appsettings.json). See documentation on SmtpClient class for description of each property. For properties that are not specified in configuration, default SmtpClient settings will be used.
Example:
{
"SimpleSPRTEMail": {
"Smpt": {
"From": "username@gmail.com",
"Host": "smtp.gmail.com",
"Port": 587,
"EnableSsl": true,
"UserName": "username",
"Password": "password",
"DefaultCredentials": false,
"TargetName": null
}
}
}
For advanced configuration, register a custom implementation of Rhetos.AspNetFormsAuth.SimpleSPRTEmail.ISmptClientProvider.
Entering user's email address
SimpleSPRTEmail package adds the Email property (ShortString) to the Common.Principal entity. Use CRUD operations on Common.Principal to edit the user's email address.
Email content and format
Email content and format is defined in SimpleSPRTEmail.EmailFormat entity. The entity should contain exactly one record.
The email format can be a plain-text or HTML (Bool IsBodyHtml).
The email body may contain the following special tokens:
{UserName}
→ will be replaced with the username.{Token}
→ will be replaced with the generated password reset token.
Troubleshooting
In case of a server error, additional information on the error may be found in the Rhetos app's log file (RhetosServer.log
for Rhetos v1-v4).
If needed, more verbose logging of the authentication service may be switched on by enabling Trace
level loggers
AspNetFormsAuth.AuthenticationService
and SimpleSPRTEmail.EmailSender
.
For example, in Rhetos v1-v4 add
<logger name="AspNetFormsAuth.AuthenticationService" minLevel="Trace" writeTo="TraceLog" />
and <logger name="SimpleSPRTEmail.EmailSender" minLevel="Trace" writeTo="TraceLog" />
in Rhetos application's web.config
or nlog.config
,
then the trace log will be written to RhetosServerTrace.log
.
Similar logging configuration will work in Rhetos 5 if using NLog.
How to contribute
Contributions are very welcome. The easiest way is to fork this repo, and then make a pull request from your fork. The first time you make a pull request, you may be asked to sign a Contributor Agreement. For more info see How to Contribute on Rhetos wiki.
Building the source code:
- Note: This package is already available at the NuGet.org online gallery. You don't need to build it from source in order to use it in your application.
- To build the package from source, run
Clean.bat
andBuild.bat
. - The build output is a NuGet package in the "Install" subfolder.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Rhetos (>= 6.0.0)
- Rhetos.AspNetFormsAuth (>= 6.0.0)
- Rhetos.CommonConcepts (>= 6.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.