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

Email address field error #63

Closed
seabelis opened this issue Aug 12, 2019 · 5 comments
Closed

Email address field error #63

seabelis opened this issue Aug 12, 2019 · 5 comments

Comments

@seabelis
Copy link

Describe the bug

When a new form is submitted, it no longer generates an email message. Also the confirmation message is not displayed.
The error shows "Message:The parameter 'address' cannot be an empty string. Parameter name: address"

To Reproduce

Steps to reproduce the behavior:

  1. Create a form with email address field. Set module settings to email generated on new and a template to display after submission.
  2. Submit form with valid email address.

Expected behavior

An email message is expected to be generated and sent to the specified recipients as indicated in module settings. Form submitted successfully message should be displayed as specified in the settings.

Screenshots

If applicable, add screenshots to help explain your problem.

Error log

Note: Debug DLL's
Please replace the current extension DLL's with the debug DLL's (if these are available with the release) and reproduce the error with the debug DLL's before pasting the error log.

Sorry, I'm not exactly sure what the above means, but here's this.
Message:The parameter 'address' cannot be an empty string. Parameter name: address

StackTrace:

InnerMessage:The parameter 'address' cannot be an empty string. Parameter name: address

InnerStackTrace:

at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding) at DotNetNuke.Services.Mail.Mail.SendMail(String mailFrom, String mailSender, String mailTo, String cc, String bcc, String replyTo, MailPriority priority, String subject, MailFormat bodyFormat, Encoding bodyEncoding, String body, List1 attachments, String smtpServer, String smtpAuthentication, String smtpUsername, String smtpPassword, Boolean smtpEnableSSL) 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, List1 attachments, String smtpServer, String smtpAuthentication, String smtpUsername, String smtpPassword, Boolean smtpEnableSSL) at DotNetNuke.Modules.UserDefinedTable.Components.TrackingController.SendMail(String from, String mailTo, String cc, String bcc, String replyto, String subject, String data, String message, String trigger, String script) at DotNetNuke.Modules.UserDefinedTable.Components.TrackingController.HandleAction(Trigger trigger, DataSet data, UserDefinedTableController udtC) at DotNetNuke.Modules.UserDefinedTable.Components.TrackingController.OnAction(Trigger trigger, Int32 rowId, UserDefinedTableController udtC) at DotNetNuke.Modules.UserDefinedTable.UserDefinedTableController.UpdateRow(DataSet ds, Int32 rowNr, Boolean isDataToImport) at DotNetNuke.Modules.UserDefinedTable.EditForm.cmdUpdate_Click(Object sender, EventArgs e)
Source:

FileName:

FileLineNumber:0

FileColumnNumber:0

Method:

Additional context

Add any other context about the problem here.

@SCullman
Copy link
Contributor

@seabelis , I followed your instructions, but I cannot reproduce your issue.

Can you please export your configuration ("Save as Template"). The file can b downloaded with Site Assets within the portals template folder. Please attach that file to a comment.
If your fnl setup contains sensitive information, please setup a simplified form first, retest your issue and export then.

@seabelis
Copy link
Author

I have retested with a form that has only one field and is set to send an email to my address on new. So it seems to have nothing to do with the collected data, just sending the email. I get the following error:
Error: is currently unavailable. DotNetNuke.Services.Exceptions.ModuleLoadException: The parameter 'address' cannot be an empty string. Parameter name: address ---> System.ArgumentException: The parameter 'address' cannot be an empty string. Parameter name: address at System.Net.Mail.MailAddress..ctor(String address, String displayName, Encoding displayNameEncoding) at DotNetNuke.Services.Mail.Mail.SendMail(String mailFrom, String mailSender, String mailTo, String cc, String bcc, String replyTo, MailPriority priority, String subject, MailFormat bodyFormat, Encoding bodyEncoding, String body, List1 attachments, String smtpServer, String smtpAuthentication, String smtpUsername, String smtpPassword, Boolean smtpEnableSSL) 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, List1 attachments, String smtpServer, String smtpAuthentication, String smtpUsername, String smtpPassword, Boolean smtpEnableSSL) at DotNetNuke.Modules.UserDefinedTable.Components.TrackingController.SendMail(String from, String mailTo, String cc, String bcc, String replyto, String subject, String data, String message, String trigger, String script) at DotNetNuke.Modules.UserDefinedTable.Components.TrackingController.HandleAction(Trigger trigger, DataSet data, UserDefinedTableController udtC) at DotNetNuke.Modules.UserDefinedTable.Components.TrackingController.OnAction(Trigger trigger, Int32 rowId, UserDefinedTableController udtC) at DotNetNuke.Modules.UserDefinedTable.UserDefinedTableController.UpdateRow(DataSet ds, Int32 rowNr, Boolean isDataToImport) at DotNetNuke.Modules.UserDefinedTable.EditForm.cmdUpdate_Click(Object sender, EventArgs e) --- End of inner exception stack trace ---

There is no problem generating email from the site itself; other modules can do so without issue.
testFormList.dnn_userdefinedtable.module.zip

@SCullman
Copy link
Contributor

Lisa, I applied your template and it worked for me.
Can you please set also your address for from: and try again?

@seabelis
Copy link
Author

Yes. Thank you. This does work. I didn't realized the portal address was no longer used as default. Thank you!

@SCullman
Copy link
Contributor

The portal address is used by default. It works for me without setting _from.

Code

                    if (from == string.Empty)
                    {
                        from = Globals.GetPortalSettings().Email;
                    }

It looks like there is no Email defined for your portal - or there is no email anymore in that portal setting for other reason, e.g. a bug within core.

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

2 participants