[Bug]: Email sender "from" displayname gets incorrectly setup
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start at the Mail.SendMail method shown in the issue and trace how PortalSettings supplies the admin email. Check how the sender display name is selected when multiple users share that email. Done means outgoing email consistently uses the Administrator account's display name, regardless of duplicate email addresses.
Written by the indexing model from the issue text.
Description
Is there an existing issue for this?
- I have searched the existing issues
What happened?
DNN used the email of the admin account setup on security as the source for the "from" on email.
See view
CREATE VIEW [dbo].[vw_Portals]
AS
SELECT
P.PortalID,
P.PortalGroupID,
PL.PortalName,
...
U.Email,
...
FROM dbo.[Portals] AS P
INNER JOIN dbo.[PortalLocalization] AS PL ON P.PortalID = PL.PortalID
LEFT JOIN dbo.[Users] AS U ON P.AdministratorId = U.UserID
This is then feed into the PortalSetttings object and passed to multiple layers.
On the Mail.SendMail method I see this code
var fromUser = (UserController.GetUserByEmail(settings.PortalId, settings.Email) != null) ?
string.Format("{0} < {1} >", UserController.GetUserByEmail(settings.PortalId, settings.Email).DisplayName, settings.Email) : settings.Email;
Notice that it will take ANY user from the database that has the same email as the admin.
Steps to reproduce?
Set multiple users on the database to have the same email of the admin and register new accounts.
The email that is being sent will sometimes have different "from" names, instead of the expected admin from display name.
Current Behavior
No response
Expected Behavior
The From name should always taken from the Admin account.
Relevant log output
Anything else?
No response
Affected Versions
10.2.0 (latest v10 release)
What browsers are you seeing the problem on?
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
- Dominant language
- C#
- Stars
- 1.1k
- Forks
- 791
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 24
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dnnsoftware/Dnn.Platform
-
Status: New
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
dnnsoftware/Dnn.Platform#7543 · 1 comment ·
Maintainers usually reply within 1 day
-
Status: New
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dnnsoftware/Dnn.Platform#6681 ·
Maintainers usually reply within 1 day
-
Status: New
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
dnnsoftware/Dnn.Platform#6051 · 4 comments ·
Maintainers usually reply within 1 day
-
Status: New
Difficulty 3/5 1-2 days Newbie friendliness 45/100
dnnsoftware/Dnn.Platform#7555 ·
Maintainers usually reply within 1 day
-
Status: New
Difficulty 4/5 3-5 days Newbie friendliness 22/100
dnnsoftware/Dnn.Platform#7554 · 5 comments ·
Maintainers usually reply within 1 day
All issues in dnnsoftware/Dnn.Platform
Similar issues
-
area-signalr
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dotnet/aspnetcore#69842 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 2 days
-
bug needs-triage
Difficulty 2/5 Under an hour Newbie friendliness 78/100
microsoft/microsoft-ui-reactor#1373 ·
Maintainers usually reply within 1 day
-
Client customer-reported KeyVault needs-team-attention question Service Attention
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Azure/azure-sdk-for-net#63861 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
:watch: Not Triaged dotnet-csharp/svc fundamentals/subsvc
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day