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

[Bug]: If the host e-mail has improper format in server settings, test e-mail results in server 500 instead of an alert #6426

Open
2 tasks done
enfJoao opened this issue Mar 3, 2025 · 0 comments

Comments

@enfJoao
Copy link

enfJoao commented Mar 3, 2025

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

If you fill an non e-mail address in the host e-mail, testing results in 500 error instead of showing an alert to the user.

Steps to reproduce?

Go to server settings => SMTP settings
Set the host email to somethingnotanemail
Click Test SMTP Settings

Current Behavior

No response

Expected Behavior

No response

Relevant log output

POST https://x.com/API/PersonaBar/ServerSettingsSmtpHost/SendTestEmail

2025-03-03 21:37:53.218+00:00 [XZ_Server][D:4][T:39][ERROR] Dnn.PersonaBar.Servers.Services.ServerSettingsSmtpHostController - System.FormatException: The specified string is not in the form required for an e-mail address.

   at System.Net.Mail.MailAddressParser.ReadCfwsAndThrowIfIncomplete(String data, Int32 index)

   at System.Net.Mail.MailAddressParser.ParseDomain(String data, Int32& index)

   at System.Net.Mail.MailAddressParser.ParseAddress(String data, Boolean expectMultipleAddresses, Int32& index)

   at System.Net.Mail.MailAddressParser.ParseAddress(String data)

   at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding)

   at System.Net.Mail.Message..ctor(String from, String to)

   at System.Net.Mail.MailMessage..ctor(String from, String to)

   at DotNetNuke.Services.Mail.CoreMailProvider.CreateMailMessage(MailInfo mailInfo, SmtpInfo smtpInfo)

   at DotNetNuke.Services.Mail.CoreMailProvider.SendMail(MailInfo mailInfo, SmtpInfo smtpInfo)

   at DotNetNuke.Services.Mail.Mail.SendMail(String mailFrom, String mailTo, String cc, String bcc, String replyTo, MailPriority priority, String subject, MailFormat bodyFormat, Encoding bodyEncoding, String body, List`1 attachments, String smtpServer, String smtpAuthentication, String smtpUsername, String smtpPassword, Boolean smtpEnableSSL, String authProvider)

   at DotNetNuke.Services.Mail.Mail.SendMail(String mailFrom, String mailTo, String cc, String bcc, MailPriority priority, String subject, MailFormat bodyFormat, Encoding bodyEncoding, String body, String attachment, String smtpServer, String smtpAuthentication, String smtpUsername, String smtpPassword, Boolean smtpEnableSSL, String authProvider)

   at Dnn.PersonaBar.Servers.Services.ServerSettingsSmtpHostController.SendTestEmail(SendTestEmailRequest request)

Anything else?

No response

Affected Versions

10.0.0 (RC)

What browsers are you seeing the problem on?

Firefox

Code of Conduct

  • I agree to follow this project's Code of Conduct
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

1 participant