I have my form up and running with no errors. However when I press send the browser says waiting for local host then stops and no email is sent. All of the smtp settings seem to be right. Heres my code however I have taken out my email and password details.
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@Import Namespace="System.Web.Mail" %>
<%@Import Namespace="System.Net" %>
<script language="c#" runat="server">
protected void SendMail()
{
// Gmail Address from where you send the mail
var fromAddress = "[removed]";
// any address where the email will be sending
var toAddress = YourEmail.Text.ToString();
//Password of your gmail address
const string fromPassword = "[removed]";
// Passing the values ...
Go to the complete details ...