Click here to Skip to main content
15,867,765 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I have a very simple feedback form: Name, Email, Comments.

I would like it send to my Yahoo email. I just wonder how can i send it to my yahoo email?

if anybody can give me the code in asp.net c# it ll be gr8. . .
Posted
Updated 28-Feb-11 9:27am
v2

Everything you ever wanted to know about sending an email can be found here[^].
 
Share this answer
 
Comments
Yusuf 28-Feb-11 15:29pm    
The right place to point OP
The code example links..[^]

There you go it returned 348,000 results..
 
Share this answer
 
http://www.developer.com/article.php/3096831[^]
http://forums.asp.net/t/971802.aspx[^]

If i misunderstand your question, please feel free to correct me.I hope the above information will be helpful. If you have more concerns, please let me know.
If this would be really helpful to you then don't forgot to Vote and Make Answer as Accepted.
 
Share this answer
 
v2
acctually i tried this code bt its not working:


protected void Button1_Click(object sender, EventArgs e)
{
if (txtEmail.Text.Length < 5)
{
lblMessage.Text = "enter email";
}
else
{
if (txtName.Text.Length < 5)
{
lblMessage.Text = "enter name";
}
else
{
if (txtQuestion.Text.Length < 5)
{
lblMessage.Text = "enter message";
}
else
{
try
{
MailMessage EmailMsg = new MailMessage();
EmailMsg.From = new MailAddress("abc@gmail.com", "plain text");
EmailMsg.To.Add(new MailAddress("xyz@gmail.com", "plain text"));
EmailMsg.Subject="Text email form";
EmailMsg.Body="<html><body>This is a testTest test</body></html>";
EmailMsg.IsBodyHtml=true;
EmailMsg.Priority=MailPriority.Normal;
SmtpClient MailClient = new SmtpClient("smtp.gmail.com");
MailClient.Credentials=new System.Net.NetworkCredential("myemailadd@gmail.com", "********");
MailClient.Send(EmailMsg);

lblMessage.Text="your email sent";

}

catch
{
lblMessage.Text="email not sent";
}
}

}
}
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900