I am trying to make a registration form that when a user enters in their information and clicks the submit button the information will go to someone's email. If someone could send me a website with tutorial on this or lead me in the right direction that would be great!
**I would show you the code I have but it is all edited in my html and it doesn't really relate, but if you need more information let me know.**
1 Year Ago
Related Article:C# ASP.NET MailMessage error
is a ASP.NET discussion thread by mmeyer49 that has 3 replies, was last updated 6 months ago and has been tagged with the keywords: c#, asp.net, mailmessage, error.
string datatosend= " Name : "+textBox1.Text+"\n Age :"+textBox2.Text;
SmtpClient c = new SmtpClient();
c.DeliveryMethod = SmtpDeliveryMethod.Network;
c.Host = "localhost";//Or Your SMTP Server's Host IP
c.Port = 25;
MailAddress from = new MailAddress("firstname.lastname@example.org");
MailAddress to = new MailAddress("email@example.com");
MailMessage mymessage = new MailMessage(from, to);
mymessage.Subject = datatosend;