Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Bug]: Email sender "from" displayname gets incorrectly setup

Open
#6,943 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp
Domain
backend

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

Status: New
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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dnnsoftware/Dnn.Platform

All issues in dnnsoftware/Dnn.Platform

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.