This is so the rich and powerful get world class models before the rest of us, the reality is dumb politicians and rich people don't realize that dense models are on there way out and MOE models are coming in, meaning after PCI-E 8 spec goes live, we run via streaming world class frontier models on a 16gb graphics card.
Question
ultimate99
I have a contact form for people to send me email.
1. I tried it using my email but didn't receive anything.
2. I want a confirmation message to appear for the user when they send an email, how do i do that?
I created the contact form using textbox control and not the Wizard in VS 2008.
Here's the code i have in contact page.
protected void PageLoad(object sender, EventArgs e) { if (IsPostBack) { SmtpClient sc = new SmtpClient("smtp.DOMAIN.com"); StringBuilder sb = new StringBuilder(); MailMessage msg = null; sb.Append("Email from: " + txtEmail.Text + "\n"); sb.Append("Message: " + txtMessage.Text + "\n"); try { msg = new MailMessage(txtEmail.Text, "email here, i know", "Message from website", sb.ToString()); sc.Send(msg); } catch (Exception ex) { //something bad happend Response.Write("Something bad happend!"); } finally { if (msg != null) { msg.Dispose(); } } } }and added this to web.config
Link to comment
https://www.neowin.net/forum/topic/843130-aspnetc-sending-mail-and-confirmation/Share on other sites
1 answer to this question
Recommended Posts