Step 5 - Setup contact form
Before you're site can send you contact information, you need to configure it so it knows where and how to send it and what it should be called.
Baby Step 1 - Configure email default values
Go to the properties tab on the 'contact' page - shown in green.
You need to enter some default information as follows
- From email - shown in red: This should be the email address that the contact details come from. It might be something like 'contact.from@{yourdomain}.com
- To email - shown in orange: This is the email address that you want to send all contact details to. It might be your own personal email address.
- Email subject - shown in blue: This is the text that will appear as the title of the email
Than save the page
Baby Step 2 - Create email account
Umbraco needs an email account to be able to send email from the contact form. This baby step explains how to set this up in your Arvixe shared hosting account (if you are using another hosting provider you will need to refer to their documentation to learn how to do this).
Login to your Arvixe account, and select the 'mail>accounts' option - shown in green.
Select the 'Create Mail Account' - shown in green
- Enter a suitable email address, select the domain to attach it to and enter a password - shown in blue. Make a note of this information as you will need it later
- Tick the 'Expand all panels' option - shown in red
- Enter your first and last names - shown in green
- The remaining options can be left unchanged
- Select the 'create' option shown in purple
That's it, you've created your email account.
Baby Step 3 - Update email server settings
The last baby step is to configure your site to use the email account you just created.
Select the 'file manager' option - shown in green
Move to the 'wwwroot' folder - shown in green - and then select 'web.config' - shown in blue.
When you're given the option to download it, save it to your hard drive.
Locate the downloaded web.config file on your hard drive using Windows Explorer and open this in Notepad.
Locate a section in the file that looks like the following
<system.net>
<mailSettings>
<smtp>
<network host="127.0.0.1" userName="username" password="password" />
</smtp>
</mailSettings>
</system.net>
You need to replace the above text with the text below, replacing all the text inside the {} braces with the relevant values
<system.net>
<mailSettings>
<smtp>
<network
host="{your mail server name}"
port="26"
userName="{the email account you just created}"
password="{the password for the email account you created}"
defaultCredentials="false"
/>
</smtp>
</mailSettings>
</system.net>
Note: You can get the name of your mail server from the login details sent to you by Arvixe when you first signed up for an account with them
A valid example might be:
<system.net>
<mailSettings>
<smtp>
<network
host="mail.mydomain.com"
port="26"
userName="john.smith@mydomain.com"
password="password"
defaultCredentials="false"
/>
</smtp>
</mailSettings>
</system.net>
Once you've done this, save the file
Make sure you're still on the 'wwwroot' folder of your website - shown in green - and then select 'upload' - shown in blue.
Browse to the web.config file that you just editied and upload this back to your sites 'wwwroot' folder.
Your setup of the contact form and site is now complete.
The next step is to populate your site with content: Create content