Removing the Sender's Name in DNN Evoq Email Notifications

Overview

Some users of DNN Evoq may want to remove the sender's name from email notifications and only include the email address.

Solution

Removing the name from the "FROM" field is not an option that can be done out of the box. You will have to engage our Professional Services for a custom solution. That said, we have a couple of workarounds available.

Method 1

  1. Create a user in your portal with the desired email address and a Display Name (while creating a user, there is a First Name/Last Name format enforced, but this can be edited later to a preferred Display name once the user is created) that should appear in the From field for respective portals. You can put a blank display name from there so that only the email address will be shown.
    • On newer versions of DNN, it is not possible to put a blank DisplayName for an Admin account (via editing the user). If you are being required to add a Display Name, there is no alternative option. You may have to set a specific character instead of a blank name in this case.
  2. Promote said user to Administrator by assigning him to Administrator Role and setting this account as Primary Administrator in Settings -> Security and Primary Administrator dropdown in the portal.
  3. Omit global SMTP settings and configure SMTP server for your portal. 

Method 2

This method will require a hard code to the CoreMessaging_SendNotification stored procedure and all system emails will have the configured user's DisplayName. Follow these steps:

  1. Locate the stored procedure `CoreMessaging_SendNotification`.
  2. Modify this stored procedure to return FirstName as DisplayName.
  3. Edit the First name of the associated Admin user to the preferred name displayed as the sender.
    • If a First Name is required and cannot be blank, there is no alternative option. You may have to set a specific character instead of a blank name in this case.

Please note that altering core stored procedures can cause unexpected behavior in the application, as other parts of the system may depend on DisplayName being formatted in a specific way. Additionally, any updates or patches to the DNN platform could overwrite your changes, which may create ongoing maintenance challenges. As such, we recommend using the first method.

 

Additional Step for Outlook users

The options above will work for Gmail/Yahoo users. For Outlook users, the Sender field from the email header is being shown to users instead of the From field. The only solution we have for this is to use a hard code within the DotNetNuke.Library/Mail.cs file (The DotNetNuke.Library is found within the DNN_core source code from your root DNN folder).

Add the line below to the Mail.cs file:

mailMessage.From = mailMessage.Sender;

 

Summary

There is no default option to remove the sender's name on email notifications and the methods shared above are workarounds. If you wish to have a custom solution, you may contact support and request a paid engagement with our Professional Services team.

FAQ

  1. What can cause unexpected behavior in the application?
    Altering core stored procedures can cause unexpected behavior as other parts of the system may depend on DisplayName being formatted in a specific way.
  2. What challenges can this solution create?
    Any updates or patches to the DNN platform could overwrite your changes, which may create ongoing maintenance challenges.
  3. Can I revert the changes if I encounter any issues?
    Yes, you can revert the changes by restoring the original stored procedure.

Comments

0 comments

Please sign in to leave a comment.