0
votes

I am helping a friend of mine to edit a few things on his website that was built using Umbraco. I am not the original author and I am pretty new to Umbraco but, I can't seem to find the answer anywhere. There is a form that is being used to send an email whenever someone wants to order supplies from the website. The form was previously working. However, he has lost access to the email account and had to create a new one. The problem is I cannot seem to locate the model to look inside of it and change where the emails are being sent.

I cannot locate the Models (there are multiple) in the Umbraco hierarchy even though I can find references to where they're are called inside of the different forms. See below:

@inherits Umbraco.Web.Mvc.UmbracoViewPage<Aeon.Models.OrderSuppliesModel>

I know this is not a URL so I am a little confused on why this is not in any of the Umbraco hierarchy. I know that since it is referencing something and previously worked it has to be there somewhere. The only other place I would think they could be is in the root directory which I don't have access to yet. Could they possibly be located there? Any type of help on this matter would be greatly appreciated.

3
If there is no interface in the back office to change email account settings then you will need the source files. Are you a programmer? What's your level of asp.net knowledge? - wingyip

3 Answers

0
votes

Since you don't have access to the code, you will have to hope there is a variable somewhere which lets you set the email, rather than it being hardcoded into the controller.

Umbraco nodes

Sometimes Umbraco developers store the email on a field on a node in Umbraco. The common places are:

  • on the page node which has the form on it
  • on a settings node
  • on the home page node

Web.config

The Web.config also has a section which can be used to easily setup variables. Checkout the <appSettings> section to see if there are keys and/or values which might indicate they're used for email.

Also, you haven't specifically said if it is the SMTP email account which has broken, or if it's the email account which submissions are being sent to. Look for the <mailSettings> section on the Web.config if you want to see the SMTP settings. There may be a 'from' field on the <smtp> element.

umbracoSettings.config

In the umbracoSettings.config there is an element which will look something like this:

<notifications>
  <!-- the email that should be used as from mail when umbraco sends a notification -->
  <email>[email protected]</email>
</notifications>
0
votes

Forms are not directly handled within Umbraco. I am assuming you are using ver 6+.

To get a form to work you rely on the core MVC functionality, which means you create a Surface Controller with Get and POST actions to handle the logic.

There will be a reference to the specific model being passed to the view within the controller logic, but its common for standard static configuration information to be stored in an Umbraco node itself. Example of such are "SMTP server" "From Address" & "Use Encryption" etc. Some people as an alternative store this information as keys in web.config.

If you are specifically looking to change the model being passed to the form (OrderSuppliesModel), if you are using Visual Studio, the model should be colored in a teal color and when you hover over it, it shows the full namespace. Click it and press F12. This should link you directly to the class module.

hope it helps.

0
votes

If you're lucky, they're using Umbraco Forms/Contour. When you log into the back office, do you see a section called either "Forms" or "Contour"?

If so, you should be able to find the form in the Forms tree, and at the bottom of the form you should be able to edit the workflows, which will allow you to change who gets emails sent to them etc.

If you don't have those sections, could you post the view that has the form on so we can see what it's doing please?