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

SMTP Sends from address does not allow sending if address is not same domain as Portal Settings #3142

Closed
thabaum opened this issue Oct 12, 2019 · 6 comments

Comments

@thabaum
Copy link
Contributor

thabaum commented Oct 12, 2019

If you have one administrator and 2 SMTP portals both with separate email accounts and domains to authenticate and send emails. email@domain.com + email@otherdomain.com for SMTP authentication account. 1 Super User Account that manages both and has one email me@domain.com

Email server wants to authenticate prior to sending.

DNN sends an email from the Administrator email instead of from the smtp server settings causing the mail not to get sent for the second portal.

A solution is to have an option in SMTP server settings to set the default "From" Portal Email account to use similar to what you can set in the Host SMTP server settings.

You can't change the "From" address sending emails. Work around is to set the administrator account to the same email as the SMTP settings, but why not just use the From address as the one from the SMTP server settings and allow an administrator to have any email account they desire.

Generally I would have things sent from "Acccounts@DOMAIN.com" or "No-Reply@domains.com" so now I need to set the administrator up with that account email, but I would rather use a more personal email for the site.

Does this make sense? Can any one confirm? My tests say my SMTP settings work emails sent correctly but when someone registers my server blocks the mail being sent. I am using the host account to run 2 portals both with that account as the host and admin account of the portals.

This is a long time issue. I can date it back to when I first started using DNN. Whatever settings and conditions used to send a verification email should be used in the test. Also possibly a test email for testing out emails going to different addresses would be great in order to test live, gmail and other mail servers to see if your registration emails are being properly sent and test/modify what they look like.

Please make sense of this for me edit the post to make sense or make a new bug report to reference this one. Any questions for clarity please ask.

@valadas
Copy link
Contributor

valadas commented Oct 12, 2019

Ok, for clarity here I am going to assume the host has an email of info@host.com and then PortalA has info@PortalA.com, PortalB info@PortalB.com

The Global SMTP server settings are a fallback for sites that do not have their own settings, and there is a field to enter the host email. The most common use case for this is when providing a mail relay for all tenants.

Then for each site, you can enter their own STMP settings, the from address will depend on the use case (module, notifications, etc) so unless we have a context we do not know exactly what from address is used for the email you are talking about. The fact that it defaults to the portal administrator email is by design, not a workaround. For instance many modules have settings for the from email, and sometimes it is even the email of the actual visitor filling a form.

The fact that the email server may refuse to send emails if they don't come from an existing user on the email server is a setting on the email server and not Dnn specific.

What could be a workaround is if you don't want site notifications to come from the site owner, then you can have more than one administrators, but the default is the email address of the site owner by design.

@valadas
Copy link
Contributor

valadas commented Oct 12, 2019

Oh, I started with examples and did not use them. What I was going to say is that the email server if the email server at host.com refuses to send emails from PortalA.com (or vice-versa) is a security setting on the email server, not Dnn related. If the from email is someotheruser@gmail.com , the email server at PortalA.com may very well refuse to send it (opposite too), etc. This is email servers security settings, not a Dnn thing.

@thabaum
Copy link
Contributor Author

thabaum commented Oct 12, 2019

It is DNN related in a way we should be able to set the email for registrations.

We should be able to set the email used for about any type of mail communication there is.

Besides the point the "From" address should be the SMTP user account address unless otherwise specified. Why not send from that address for DNN system function related sending?

My work around of coarse is to create an admin account with the address I want. But what if I want mail messages from things such as notifications and user registrations one "no-reply@d.com" the other "accounts@d.com" There is no way to set this currently in DNN but any other module created for DNN would have this feature like you said and for a reason, to allow you to setup your system no matter to work with your email server and needs easier. And what if I want my admin account to be a personal moderator account people communicate differently to the notifications account the one that does not take replies.

How do you set this? I would have to create two accounts one for sending the emails and a second account for the moderator.

I can tell by the answer "Not a dnn things" that you understand what I am talking about at least.

Maybe a feature request as it does not break things. SMTP settings I can send mail from I just have to be sending from the same domain it can be any from address, just needs the domain. This is very common mail setting that avoids spam. Otherwise your using an open relay.

There is now a new "Host Email" setting, there should be a "Portal Email" setting that is used to send emails from if set and issue solved makes my world make sense to me. I been fighting on this a long long long long long time and now there is a Host Email so I can tell this issue is coming up in other tickets for years now.

You could also put "use username as senders address" or just a place to set the Portal Email used for communication from DNN to users. Not every account uses an email account for a username so I can see why not to use the SMTP Username setting as the "Send From" address so you need an email address that can be set that is other than whatever administrator is managing the website.

Put this to bed, please :)

image

@thabaum
Copy link
Contributor Author

thabaum commented Oct 12, 2019

I would love to see Portal Email and change SMTP Enable SSL to SMTP Enable SSL/TLS
image

@sleupold
Copy link
Contributor

@thabaum,
registration and password reset mails are sent from the email address of the user specified as admin in Site Settings. If the SMTP server account being used has been granted "relaying", the account may send using any "from" address. If the SMTP server host does not grant this permission, you may specify an account per DNN website, which should have same domain as the admin email address of the website. You may, however, face issues with modules trying to send from a different address (but this is not a use case, which can be fixed by DNN platform).

@valadas
Copy link
Contributor

valadas commented Oct 14, 2019

Ok, so we now have 3 parts to this issue and it is still not actionable per it's title.
The first part is regarding permissions of the mail server, so not dnn related.

The second part is for adding a UI to set emails for different things like registrations vs notifications, vs using the site owner email for all system emails regarding a site.

And the third is to change the ssl wording for ssl/tls.

I will close this issue, could you please open new issues (1 for each) for the other 2 items please. Makes it easier for someone to pickup a well defined single thing and implement.

@valadas valadas closed this as completed Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants