Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot change sending email address from host@change.me #3168

Closed
worldheadquarters opened this issue Oct 18, 2019 · 11 comments
Closed

Cannot change sending email address from host@change.me #3168

worldheadquarters opened this issue Oct 18, 2019 · 11 comments

Comments

@worldheadquarters
Copy link

Description of bug

On a new install of DNN 9.4.1
The SMTP Server settings test sends an email with the return address as host@change.me instead of the email address configured for the super user account.

Steps to reproduce

List the steps to reproduce the behavior:
On the personna bar:
Enter the appropriate email address for the superuser in the profile.

  1. Go to 'servers : server settings : SMTP server'
  2. Enter the appropriate information for your mail server
  3. Click on 'Test SMTP Settings.'

Current result

All emails sent have host@change.me as the sender

Expected result

Return address should be that of the duperuser (or perhaps another designitated actual address).

may be helpful for resolution.

Affected version

[X] 9.4.1 only one tested

Affected browser

Not a browser issue

@valadas
Copy link
Contributor

valadas commented Oct 18, 2019

Hmm, just gave it a try, so 2 things:

  1. The host email is the one in the UI to set the host settings, there could be multiple host users so the one used for the test email is the one in the email UI and not the actual email of any of the host users.
  2. If you enter the settings and test right away, it uses the previously configured email, if you save and re-test then it picks it up. Keeping this issue as an improvement to use the one in the field instead of the previously saved one...

@valadas valadas added this to the 9.4.2 milestone Oct 18, 2019
@worldheadquarters
Copy link
Author

It is actually somewhat confusing, as I was not sure what the sending or destination addresses are supposed to be. I assume the sending address would be the one in the UI and the recipient address would be the address in the user profile of the user initiating the test. (which seems to work, but the "from" field in the message source is still host@change.me, even after saving, clearing the cache, logging out and re-trying it.

MIME-Version: 1.0
Sender: "World Headquarters" admin@worldheadquarters.xyz
From: host@change.me
To: jimb@empulse.net
Reply-To: host@change.me
Date: 18 Oct 2019 22:14:11 -0700

The little popup info box always says that the sender is host@change.me and i cannot find any place to change that.

@sleupold
Copy link
Contributor

registration emails are sent from the admin account specified in Site Settings. if you left default values within the DNN install wizard, the first account will get assigned this email address in his user account.

@worldheadquarters
Copy link
Author

I changed the email address in all the appropriate places. In the message source of emails that were sent, as illustrated above, the email actually gets sent, but in the the message source"From" and "reply to" do not change. I do not see anywhere in "site settings" to specify an admin account for the site (Was this setting accidentally left out of the UI?). Anyway, on this site (which I am using only for testing and theme development) there is only one account - Host.

@thabaum
Copy link
Contributor

thabaum commented Oct 26, 2019

. I do not see anywhere in "site settings" to specify an admin account for the site

I looked forever too and found it here:

SETTINGS > SECURITY > LOGIN SETTINGS > BASIC LOGIN SETTINGS

image

Primary Administrator dictates the email used. However it is hard to test as I need to create emails and portals over and over to figure these things out and test if emails are actually getting sent... it has been one of my top priorities over the past 5+ years finding out how to convince that the verification email issue and this send from address issue is causing major headwinds and slowing down production sites being produced.

this is related to my previous issues. I have been giving thought and under Host AND PORTAL settings you should be able supply an email for sending for each type of account OR under registration settings is where it would make sense if not actually under SITE SETTINGS which might make more sense. I think maybe an "EMAIL SETTINGS" or "NOTIFICATION SETTINGS" tab maybe should be added under "SITE SETTINGS" that allows you to set email addresses to use for sending out the different types of notifications DNN provides.

I think an email account to be used should not be set to an admin account for registrations... then you have to make a separate admin account which I feel is a security risk as you use this only to set the email to be used for registrations as you may have another account that you like to use for communication as a moderator or administrator of the website instead of the one used for example noreply@domain.com or accounts@domain.com when the admin uses admin@domain.com or user@someotherdomain.com.

Anyone trying to get into a DNN CE account would just bruteforce the email over time being used if Email as Username is used and just register for the website, see who the reply address is and start attacking that account for full admin access.

It has been a DNN CE issue since the beginning of time in my book and I must not be communicating it well enough although I keep trying. I can probably find at least 10 posts of mine or more related to SMTP and email accounts on the old support site and github... I wonder how EVOQ handles this as I bet customers complained about it there as well but it got fixed.

None the less SMTP notifications email used is currently confusing and should be independent from accounts on the website. A contact administrator link for maybe a website bug or error maybe use the Administrator account however not for account registrations or general website notifications. Users could think you are personally talking to them sometimes when you are not. I would rather them use a support system or contact form for communication to website administrators or moderators.

Thank you for adding it to 9.4.2 milestone!

@thabaum
Copy link
Contributor

thabaum commented Oct 26, 2019

Keeping this issue as an improvement to use the one in the field instead of the previously saved one...

@valadas
can you do this for PORTAL settings as well as HOST settings? Portal settings is missing this field.

@sleupold
Copy link
Contributor

when you are specifying the "primary administrator" in site settings, the email address in his user account is used as sender.

@worldheadquarters
Copy link
Author

Thanks to thabaum, I did find the setting in SECURITY. In this installation, there is only one user, "superuser", but the "from" and "reply to" are still "host@change.me" although the email address associated with the superuser account is different.

@thabaum
Copy link
Contributor

thabaum commented Nov 3, 2019

I feel the pain and I believe I have found the issue. I am trying to find out how to exactly get the email logic and set the parameters correctly. While I am doing that I am also seeing where the hostEmail settings are set and setting these up to be used. But I believe @valadas is working on something as well not sure getting used to putting things together here but I believe i have a few changes that can help in mind.

This issue really dates back to 2006 DNN version 4

https://www.dnnsoftware.com/forums/threadid/86505/scope/posts/change-portal-administrator-email-address

@thabaum
Copy link
Contributor

thabaum commented Nov 12, 2019

Going forward if the PR is accepted you should be able to create a portal admin account that uses it's account for sending the mail. Then create a second admin account to test sending emails so that you can edit the email address for that account to whatever you like for testing purposes. The email will get sent to the current user with the test smtp request.

I would like to add an option to "Use Username for Sender Address". And then maybe a way for controlling the email used for communications in one location if more are to be used to separate the types of notifications. IE one from account verification might be different from the one you wish to use for a forum or for a newsletter.

It would be cool to be able to label and put an email address into the database and then a feature in modules could be to select which site email address to use for sending each type of notification.

A little much for now so much to chew on... Security Administrator email to the SMTP area we could at least put a help note letting administrators know to set the administrator email used for the portal under Security for the end user.

mitchelsellers pushed a commit that referenced this issue Nov 13, 2019
* Use Admin Email for Send if smtpHostMode false

* Fix Test Email Settings TO and FROM Addresses

If I did this right and it should make sense is I set the test email to be able to go to the user testing.  After all they are who are trying to make it work.  It can be any email used by anyone and usually to see this feature you are a host or portal administrator so security should not be as much of a concern here.

The FROM address will use the HOST email settings if set to HOST mode in DNN for the portal, otherwise it should use the Portal Administrators Email account to send from.

This however does not address the issue of using the email address supplied in settings and creating another setting which will be applied next to figure out the correct logic.

* Update ServerSettingsSmtpAdminController.cs

* Fix build issue to previous changes.

PortalSettings.UserInfo.Email 
is this the current user email?

I am still getting my things setup.  I ran VS 2019 to build successfully and I am trying to read through the namespaces correctly so I can understand the changes.  I noticed a number of files possibly needing updates due to being deprecated in 9.4.2 but after I changed the namespace issue those warnings went away.  

One last thought is how do you get intellisense working on DNN solution.  Is that a dream to have or am I missing something in my setup?

* Change to address to the current user's email testing the server.

I believe a UI to set the TO address would be nice to help troubleshoot and address issues trying to send to a specific user.

* Corrected To address for current user email

* TO Current User Email
@valadas
Copy link
Contributor

valadas commented Nov 14, 2019

Merged

@valadas valadas closed this as completed Nov 14, 2019
donker pushed a commit that referenced this issue Nov 15, 2019
* Do not store these portal settings when setting their property on the portalsettings object

* Removed DnnHttpControllerActivator and added DependencyResolver implementation using the IServiceProvider

* Added xml comments for the new DnnDependencyResolver

* Added DnnDependencyResolver Unit Tests

* Replaced IServiceProvider mock with full IServiceProvider implementation to work with Web API tests

* Added more unit tests for the DnnDependencyResolver to cover GetServices (multiple) and BeginScope

* Do not show "No Search results" message when no search is performed. (#3203)

* Revision of build process part 1 (#3137)

* Move website folder

* repairs

* Update Cake

* Move external task to its own file

* Begin packaging scripts in cake

* Further work on packaging

* Ensure Telerik project also gets new version nr

* Move Telerik PDF to its proper place

* New logic for packages that are already in final form in the repo and just need to be zipped.

* Bring fips Lucene lib back under git control

* Newtonsoft package and repair to telerik package

* Splitting off other tasks

* Upgrade and deploy packages

* Symbols package

* Get rid of platform ver in manifest

* Final fixes - working packages

* Move compilation stuff

* House cleaning

* peg utils version

* Fix to ckep script

* suppress warnings

* Variable initialization issue

* Removing unused scripts

* Revert change to Telerik package version

* Move "other" to "thirdparty"

* Get rid of hard coded Newtonsoft version

* Max cpu to 4 for compiling

* Repairs to MSBuild scripts to get AE to build properly

* Correcting paths

* Cleaning up

* Trying to fix ignore file

* Update Build/Cake/thirdparty.json

Co-Authored-By: Brian Dukes <bdukes@engagesoftware.com>

* Remove absolute path from .gitignore

* Fix extension of DNC library package

* Merging AE and DNN build scripts

* Fixes to scripts

* Clean up symbols project for AE since they are included in DNN project now

* Add previously untracked Yahoo compressor dlls

* Remove version information from SolutionInfo.cs

* Fix errors introduced in rebase

* Fix incorrect paths

* Change build order of MSBuild to build extensions before personabar ui.

* Make white-space visible in log viewer (#3198)

* DNN-34236: check the url with case insensitive.

* DNN-29417 Username is changed to email address in the user profile if the "Use Email Address as Username" is enabled.

* Fix to installer and the dependencies of the HTML and DA modules

* DNN-24945 - Always redirect to the source portal page after creating (#3223)

group

* Fix Typo (#3234)

* Improve querystring parse (#3242)

* Improve props popup

* Improve input checking of sites (#3243)

* Fixes an upgrade issue that affects 9.4.1 => 9.4.2 upgrades (#3282)

* Fixes an issue with a duplication of assembly binding

* Removed hardcode version in manifest

* Further reorganization of build process (#3236)

* Introduce settings and add custom version nr

* Ability to create a local dev site

* Move node workspaces to root

* Reshuffling of variables in MSBuild

* Repairs

* Fix

* Allow local override of global build variables

* Only save manifests if the file is not there. This prevents overwriting in case of a failed build before.

* Ensure projects build in debug to the website path specified by the platform build settings

* Don't track vscode folder

* Fixes #3168 Test Sending Email Issues (#3237)

* Use Admin Email for Send if smtpHostMode false

* Fix Test Email Settings TO and FROM Addresses

If I did this right and it should make sense is I set the test email to be able to go to the user testing.  After all they are who are trying to make it work.  It can be any email used by anyone and usually to see this feature you are a host or portal administrator so security should not be as much of a concern here.

The FROM address will use the HOST email settings if set to HOST mode in DNN for the portal, otherwise it should use the Portal Administrators Email account to send from.

This however does not address the issue of using the email address supplied in settings and creating another setting which will be applied next to figure out the correct logic.

* Update ServerSettingsSmtpAdminController.cs

* Fix build issue to previous changes.

PortalSettings.UserInfo.Email 
is this the current user email?

I am still getting my things setup.  I ran VS 2019 to build successfully and I am trying to read through the namespaces correctly so I can understand the changes.  I noticed a number of files possibly needing updates due to being deprecated in 9.4.2 but after I changed the namespace issue those warnings went away.  

One last thought is how do you get intellisense working on DNN solution.  Is that a dream to have or am I missing something in my setup?

* Change to address to the current user's email testing the server.

I believe a UI to set the TO address would be nice to help troubleshoot and address issues trying to send to a specific user.

* Corrected To address for current user email

* TO Current User Email

* DNN-29110 Site Assets > Select All is not working (#3251)

* DNN-29110 Site Assets > Select All is not working

* Code review fix

* Moves Remember Login above Login Button:  referenced in issue #2471 #3255 (#3256)

* Move Remember Login Above Login Button

* Update Login.ascx

* file copy paste issue...

* DNN-34250 Search is not working even after re-Indexing Search for All DNN Portals (#3260)

* Fixes duplication in DotNetNuke.Website.csproj

* Removed reference to missing LeftMenu files
valadas pushed a commit that referenced this issue Dec 3, 2019
* Do not store these portal settings when setting their property on the portalsettings object

* Removed DnnHttpControllerActivator and added DependencyResolver implementation using the IServiceProvider

* Added xml comments for the new DnnDependencyResolver

* Added DnnDependencyResolver Unit Tests

* Replaced IServiceProvider mock with full IServiceProvider implementation to work with Web API tests

* Added more unit tests for the DnnDependencyResolver to cover GetServices (multiple) and BeginScope

* Do not show "No Search results" message when no search is performed. (#3203)

* Revision of build process part 1 (#3137)

* Move website folder

* repairs

* Update Cake

* Move external task to its own file

* Begin packaging scripts in cake

* Further work on packaging

* Ensure Telerik project also gets new version nr

* Move Telerik PDF to its proper place

* New logic for packages that are already in final form in the repo and just need to be zipped.

* Bring fips Lucene lib back under git control

* Newtonsoft package and repair to telerik package

* Splitting off other tasks

* Upgrade and deploy packages

* Symbols package

* Get rid of platform ver in manifest

* Final fixes - working packages

* Move compilation stuff

* House cleaning

* peg utils version

* Fix to ckep script

* suppress warnings

* Variable initialization issue

* Removing unused scripts

* Revert change to Telerik package version

* Move "other" to "thirdparty"

* Get rid of hard coded Newtonsoft version

* Max cpu to 4 for compiling

* Repairs to MSBuild scripts to get AE to build properly

* Correcting paths

* Cleaning up

* Trying to fix ignore file

* Update Build/Cake/thirdparty.json

Co-Authored-By: Brian Dukes <bdukes@engagesoftware.com>

* Remove absolute path from .gitignore

* Fix extension of DNC library package

* Merging AE and DNN build scripts

* Fixes to scripts

* Clean up symbols project for AE since they are included in DNN project now

* Add previously untracked Yahoo compressor dlls

* Remove version information from SolutionInfo.cs

* Fix errors introduced in rebase

* Fix incorrect paths

* Change build order of MSBuild to build extensions before personabar ui.

* Make white-space visible in log viewer (#3198)

* DNN-34236: check the url with case insensitive.

* DNN-29417 Username is changed to email address in the user profile if the "Use Email Address as Username" is enabled.

* Fix to installer and the dependencies of the HTML and DA modules

* DNN-24945 - Always redirect to the source portal page after creating (#3223)

group

* Fix Typo (#3234)

* Improve querystring parse (#3242)

* Improve props popup

* Improve input checking of sites (#3243)

* Fixes an upgrade issue that affects 9.4.1 => 9.4.2 upgrades (#3282)

* Fixes an issue with a duplication of assembly binding

* Removed hardcode version in manifest

* Further reorganization of build process (#3236)

* Introduce settings and add custom version nr

* Ability to create a local dev site

* Move node workspaces to root

* Reshuffling of variables in MSBuild

* Repairs

* Fix

* Allow local override of global build variables

* Only save manifests if the file is not there. This prevents overwriting in case of a failed build before.

* Ensure projects build in debug to the website path specified by the platform build settings

* Don't track vscode folder

* Fixes #3168 Test Sending Email Issues (#3237)

* Use Admin Email for Send if smtpHostMode false

* Fix Test Email Settings TO and FROM Addresses

If I did this right and it should make sense is I set the test email to be able to go to the user testing.  After all they are who are trying to make it work.  It can be any email used by anyone and usually to see this feature you are a host or portal administrator so security should not be as much of a concern here.

The FROM address will use the HOST email settings if set to HOST mode in DNN for the portal, otherwise it should use the Portal Administrators Email account to send from.

This however does not address the issue of using the email address supplied in settings and creating another setting which will be applied next to figure out the correct logic.

* Update ServerSettingsSmtpAdminController.cs

* Fix build issue to previous changes.

PortalSettings.UserInfo.Email 
is this the current user email?

I am still getting my things setup.  I ran VS 2019 to build successfully and I am trying to read through the namespaces correctly so I can understand the changes.  I noticed a number of files possibly needing updates due to being deprecated in 9.4.2 but after I changed the namespace issue those warnings went away.  

One last thought is how do you get intellisense working on DNN solution.  Is that a dream to have or am I missing something in my setup?

* Change to address to the current user's email testing the server.

I believe a UI to set the TO address would be nice to help troubleshoot and address issues trying to send to a specific user.

* Corrected To address for current user email

* TO Current User Email

* DNN-29110 Site Assets > Select All is not working (#3251)

* DNN-29110 Site Assets > Select All is not working

* Code review fix

* Moves Remember Login above Login Button:  referenced in issue #2471 #3255 (#3256)

* Move Remember Login Above Login Button

* Update Login.ascx

* file copy paste issue...

* DNN-34250 Search is not working even after re-Indexing Search for All DNN Portals (#3260)

* DNN-32474 - Recursive delete option is added (#3249)

* Move Country Above Region in UserProfile.cs

* spacing issue resolved.

* I keep saving but github is moving it on its own.

* Fixed tab for spaces to resolve spacing issues

* Add PortalSettings overloads back (#3295)

Fixes #3289

* Updates issue templates as per 9.4.2 release

* Move Email Above Username in User.ascx #3305 (#3306)

* Move Email Above Username in User.ascx

* Fixed tab index values in User.ascx

* Fix NuGet warning NU5048 (#3304)

The iconUrl property of the nuspec file is deprecated, it's recommended
to add an icon property, which points to a file within the package,
while also retaining the iconUrl property for older clients.
See https://docs.microsoft.com/en-us/nuget/reference/nuspec#iconurl

* Word-Break added to Journal P (#3307)

* Set core object versions to core version (#3287)

Ensure skin and radeditorprovider get the core version nr and add SPROC to set the version of all core packages/desktopmodules to the core version

Fixes #3239

* Third installment of build reorganization (#3285)

* Improve versioning

* New approach: keep versions in source control and change upon CI build

* Remove previous versioning logic

* Cleaning up tasks

* Fixes

* Ensure UpdateDnnManifests targets just the right manifests

* Harmonize naming of zips and nuget packages

* Testing webpack building to dev website

* Adjust webpack projects in AE to build to dev site

* Fixes

* Delete duplicate stuff

* This is generated by Webpack and shouldn't be tracked

* Include missing project from Lerna

* Fixes for building SitesListView

* Update to packages

* Further cleaning

* Remove RadEditorProvider

* Fix ModuleSettings > Added to Pages grid, pager wasn't working

* Allow only alphanumeric characters to be used when forming url from website name (#3316)

* Ensure UpdateDnnManifests doesn't run for building dev site (#3314)

* Reload page when the code tells you to (#3315)

* Reload page when the code tells you to

* Optimize code

* Google Analytics TrackingID is stored in lowercase #3318 (#3322)

* Update sums.resources

* Fix casing mismatch errors in security analyzer file compare

* Update Dnn.AdminExperience/Extensions/Content/Dnn.PersonaBar.Extensions/Components/Security/Checks/CheckDefaultPage.cs

Co-Authored-By: Brian Dukes <bdukes@engagesoftware.com>

* Registered IPersonaBarContainer with DI (#3329)

* Document approval process and group

* Fix typo

* Relaxed nuget.cake wildcard (#3331)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants