Hi, I'm trying to make a contact form, but it won't send the e-mail when I press send.
It doesn't make an error, just nothing happens.
I really don't know what the problem can be.
I'm doing it in .net c#
here is my code from my cs page:
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Net.Mail;
public partial class dkkontakt : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void submit_click(object sender, EventArgs e)
{
MailMessage Emailmsg = new MailMessage("noreply@hotmail.com", "mymail@hotmail.com");
Emailmsg.Subject = "Kontaktform";
Emailmsg.Body += "E-mail" + email.Text;
Emailmsg.Body += "Navn: " + name.Text;
Emailmsg.Body += "Tekst: " + besked.Text;
}
}
Hope someone can see the problem and help me?
thanks