Form notifications not sending
I am getting the following message in the trace log when i fill out a form and it attempts to send emails to the subscribers. There are no errors in the error logs and the user filling out the form does not receive any messages either. This is on Sitefinity 6.3
Message: Notification service: Failed to send notification message for Account: ThisApplicationKey, Module: Forms, with messageJobId: '0d831d93-3dc5-6b14-9e0a-ff000016802d' Error: The parameter 'address' cannot be an empty string.
Parameter name: address
Can you please check your SMTP settings under Administration->Settings->Advanced->System and check if you have filled the default sender address, which is required parameter for Sitefinity to be able to send emails. If any issues persist, please let us know, we'll be glad to help further.
Sorry, i should have mentioned that i have filled out the smtp settings, ecommerce email settings notification profiles and ensured notifications are enabled. I have used the test email button in the email campaigns section and a test email was sent and i successfully received it.
Could it be related to this?
I created a new form and did some testing with interesting results. So i am currently using 2 membership providers, the default sitefinity one as well as a sql membership provider. When i created this new test form i happened to be logged in with a sitefinity user and subscribed to it and i got the email. However when i subscribe to it with a sql user it breaks and no one that is subscribed gets an email. Unfortunately all of my users are on the sql membership provider so i really need it to work.
Out of curiosity I went and tested the confirmation email for new user registration on the sql provider as i hadn't gotten around to testing it either (this is a brand new site but users are being migrated from an old site).Turns out that registration confirmation emails fail as well but actually throw an exception with message :Value cannot be null. Parameter name: from
and here is the stack trace
at System.Net.Mail.MailMessage..ctor(String from, String to)
at Telerik.Sitefinity.Web.Mail.EmailSender.CreateRegistrationConfirmationEmail(String confirmationEmailAddress, String userEmailAddress, String userName, String confirmationPageUrl, String subject, String body)
at Telerik.Sitefinity.Security.Web.UI.RegistrationForm.SendRegistrationConfirmationEmail(User user, UserManager userManager)
at SitefinityWebApp.Widgets.Registration.CuRegistrationForm.SendRegistrationConfirmationEmail(User user, UserManager userManager) in c:\Users\davidv\Documents\Visual Studio 2012\Projects\SVN\CUSiteFinity\CUSiteFinity\Widgets\Registration\CuRegistrationForm.cs:line 54
at Telerik.Sitefinity.Security.Web.UI.RegistrationForm.RegisterButton_Click(Object sender, EventArgs e)
So to try and track it down a little further i built a custom control real quick and inherited from RegistrationForm and overrode the SendRegistrationConfirmationEmail method so i could do a little debuging and found that the UserManager fields for ConfirmationEmailAddress, SuccessfullRegistrationMailAddress and RecoveryMailAddress and the associated subject and body fields were all null
It appears that sitefinity doesnt know what from address to use when sending email to any of the users on my sql membership provider. I know on the sitefinity provider i can fill in these fields from the UI but they are not valid for the sql provider. All of the email sections i can find in the settings have a from address filled out is there a way to make it default to one of these? This is the article i used to setup my sql provider and i did follow the steps at the bottom to put these fields in the appsettings.
I am suffering from the same problem reported at feedback.telerik.com/.../101406-forms-sitefinity-6-3-forms-doesnt-send-email-notification-for-the-first-created
Everything is configured and all other form notifications are working, just not the first form I created. I've been battling with it for far too long already, pulling hair out even.
Any thoughts on this issue?
One option is to manually add your email in the form settings (screenshot). Do not use subscribe link.
Another option is to download the latest internal build, where this issue is fixed.
One of our clients is having the same issue and adding additional emails under the settings of the form doesn't work. The only thing that has worked has been recreating the entire form. Really nice to use the forms as a workaround due to a CMS limitation only to have the form notifications not work. Upgrading to an internal build is out of the question and this client has a bunch of forms, looks I'll be recreating them for the next couple hours since you can't duplicate them like other content items. Who do we bill for this?
I do understand your frustration.
1) Telerik fixed the bug and I guess that all could do
2) Form duplication is something you should see in 2014
I spent quite a while troubleshooting this problem. I did end up rebuilding my forms once which took hours but then the problem occurred again after the first few form submissions. After a bit of looking around I noticed that in my instance the sf_notif_msg_job table in the database had a bunch of entries where the sender_address was null. I did some testing on a fresh instance and found that this table does not usually have things sitting in there. Also the sf_notif_subscribers had entries with blank email fields. I ended up writing a sql script to clear out all the notifications with missing emails and it all started working again. Im not sure how these got there originally but after clearing them I have not seen them come back for the existing forms. I have seen some pop up after creating new forms and I would have to clear them out again but at least I didn't have to keep recreating my forms as several of my forms have programmatic names for all the fields set which takes a while to recreate. Here is the script I used:
delete from sf_notif_msg_job_log;
delete from sf_notif_msg_job;
delete from sf_notif_subscriptions where subscriber_id in (select id from sf_notif_subscribers where email = '')
delete from sf_notif_subscribers where email = ''
Thank you very much David for researching and sharing your findings with the community.
Duplication of page templates and forms is already in our product roadmap for Sitefinity 7.0 which is expected to be released in April.
Is there an ETA on a true fix for this problem? I too am having no luck in getting email notifications to work.
This is already fixed in our latest internal build. If you do not want to wait for SItefinity 7.0, you can download it from your telerik account.
Thanks, Vassil. Is there a release date on Sitefinity 7? I haven't been able to find one and I know I'll be asked as form submission email notification is one of our requirements for a current project.
It is expected next month (around in the middle of April).
Downloading 6.3.5029 because of this bug. If I am reading correct the bug was fixed in 6.3.5014,
After upgrading do we still have to recreate the forms already creted or should the update take care of the bug?
PS: Is it just me or is downloading internal builds slow as a snail?
Yes, regarding this bug, after applying the fix, Sitefinity should be able to send emails without re-creating the entire form.
David, just ran this script and my form is working so thank you. Do you know if it is permanent? Others have commented that upgrading did NOT fix their notifications here:
Can sitefinity chime in here besides just saying the internal build fixed it? Upgraded sites vs. new sites seem to behave differently. Why does deleting the records make the form work and what causes them to be there?
Unfortunately no, this is not a permanent solution as I have had to do it again periodically and I have not identified exactly what causes it yet. I am hoping to be able to test out version 7 soon to see if that fixes the issue.
I have installed Sitefinity 7.0 and am thoroughly frustrated as my form notifications still do not work! I am subscribed to form notifications. I have checked "Send email to me" and I received a notification for one submission but only one of the many I submitted. I then added a coworker to the list of people who should receive notifications. Of all the form submissions I did, he received exactly 0 notifications when he should have received all 4. I thought this had been fixed in a hotfix and carried over into version 7?!
I am sorry for the inconvenience you are experiencing.
The form notifications are solely dependent on the SMTP server in order to be functional. There was a known issue in Sitefinity 6.3 where the first form created does not send notifications, but this was fixed in some of our internal builds as mentioned in my previous reply.
In case you do not receive form notifications from any of your forms, than the issue is most likely related with some misconfigurations of your SMTP module. I advise you to double check your configurations:
For your convenience I have prepared this short video tutorial how I am setting and testing form responses (video)
This could also be caused by your smtp server - you can use another or in order to isolate the source of your issue (in case it has to do something with server / network) to use smtp4dev which tracks all outgoing emails.
In case your issue persists no matter what you do, please open a support ticket and provide us backend credentials to further examine your problem.
Thank you for your quick reply, Vassil. Unfortunately, our SMTP settings are all configured just as you show in your video and what I really don't understand is why I did receive one notification but never another in subsequent tests. Why would it work sporadically? Also, the SMTP information I'm using is working just fine in many of our applications. Only in Sitefinity is it an issue.
I have submitted a support ticket and will consider trying SMTP4Dev once I've heard back.
Signup for a free http://www.mailgun.com/ account, if you send a low volume of email it costs nothing and the logs and analytics are FANTASTIC.
I also have this problem with all of my smtp settings set correctly. Its not the same issue as some other issues referenced above with the first form either since this happens on multiple of my form. I have dug into the log files on my exchange server and sitefinity never attempts to send the emails to it so i don't think its a problem there. I also dont have any problems with emails from other sections on my site so i dont really think its an smtp configuration problem. In my case the clue is the blank emails in the database and my trace file showing errors about invalid email addresses. The last time i was troubleshooting this i was thinking that it was related to my sql membership provider as I have run into several instances of things including emails from other sections not working because of the sql membership provider and I ended writing some code to override the default sitfinity methods. I am hoping to be able to get back to troubleshooting this again soon and maybe pinpoint where this is breaking.
We have a 6.3.5000 site where all forms were recreated and all forms are currently emailing. They are also all writing the trace.log error and adding the funky sf_notif records so there's not an exact science to what's going wrong. The recreation seemed to fix it though.
Another 6.3.5000 site has one form, that was recreated, and it is doing above except was not emailing. I ran your script and it started working. I just updated it to 6.3.5029 hoping that will help.
This same site we deployed to a client environment and their smtp security wasn't correct, yet no error logging in sitefinity. Just happily said success. That and the form issue made an underquoted deployment a joy. I added a test aspx email page that spit out the error. If there still is an issue, this seems like a very high priority fix. Glad it logs the form responses in the db OOB at least.