umbraco.UmbracoSettings.NotificationEmailSender deprecation ... where to go from here?
Hi,
In the past when I wanted to send an email from my app and make it appear to come from the Umbraco site I did this:
System.Net.Mail.MailMessage m = new MailMessage();
m.From = new MailAddress(umbraco.UmbracoSettings.NotificationEmailSender);
But now, with Umbraco 7.1.0, I get the following message:
"Warning: umbraco.UmbracoSettings is obsolete.
Use UmbracoConfiguration.Current.UmbracoSettings instead,
it offers all settings in strongly typed formats. This class
will be removed in future versions."
However, searching the 7.1.0 source solution I cannot find UmbracoConfiguration. And googling it I cannot find any information about it or about how to read umbraco configuration in general.
@Jan ... I searched the 7.1.3 solution and didn't find an UmbracoConfiguration class. I did find a reference to it in Umbraco.Web\umbraco.presentation\umbraco\controls\ContentTypeControlNew.ascx.cs ... line 433, which is commented out, is:
umbraco.UmbracoSettings.NotificationEmailSender deprecation ... where to go from here?
Hi,
In the past when I wanted to send an email from my app and make it appear to come from the Umbraco site I did this:
But now, with Umbraco 7.1.0, I get the following message:
However, searching the 7.1.0 source solution I cannot find UmbracoConfiguration. And googling it I cannot find any information about it or about how to read umbraco configuration in general.
Can anyone point me in the right direction?
Thanks!
Hi Chester
Hmm, did you have a look at the 7.1.3 branch to see if it perhaps exists there?
/Jan
@Jan ... I searched the 7.1.3 solution and didn't find an UmbracoConfiguration class. I did find a reference to it in Umbraco.Web\umbraco.presentation\umbraco\controls\ContentTypeControlNew.ascx.cs ... line 433, which is commented out, is:
I uncommented the lines and Visual Studio gave me this warning:
So I guess it's something that is coming in a future release. Maybe someone jumped the gun by marking umbraco.UmbracoSettings as obsolete?
Hi Chester
Yeah sure could seem like it.
I suppose the old method still works but just gives you the "obsolete" warning then?
/Jan
Old topic but hit the same thing earlier today.
It looks like the way to retrieve this now is via:
is working on a reply...