Click here to Skip to main content
15,905,785 members
Please Sign up or sign in to vote.
2.00/5 (3 votes)
See more:
Hi,
I am Rahul Attarde,i want code for contact us form and throw contact us page,i send online email in C#.
Please help me about this problem.
Posted
Updated 23-Jul-12 1:24am
v4
Comments
AmitGajjar 23-Jul-12 2:21am    
What you have done to do this ? i can't see any code that you have created.
Sergey Alexandrovich Kryukov 23-Jul-12 2:34am    
If you think there is "online e-mail" what would be "off-line e-mail"? :-)
--SA

Google broken where you live ?

ASP.NET creates webpages, it does not send emails. Your C# code will not care that it's in an ASP.NET site.

This[^] is how google works.
 
Share this answer
 
Hi I hope that help you
MailMessage MailMesaji = new MailMessage();
 MailMesaji.Subject = "Hello";
 MailMesaji.Body = " How are u";
 MailMesaji.BodyEncoding = Encoding.GetEncoding("Windows-1254");
 MailMesaji.From = new MailAddress("Email Sender @ Domain");
 MailMesaji.To.Add(new MailAddress("Email Reciever @ Domain"));
 SmtpClient Smtp = new SmtpClient("smtp.mail.yahoo.com");
 OpenFileDialog Ofd = new OpenFileDialog();
 if (Ofd.ShowDialog() == DialogResult.OK)
 {
 string Att = Ofd.FileName;
 Attachment ATTa = new Attachment(Att);
 MailMesaji.Attachments.Add(ATTa);
  
 }
  
 Smtp.Credentials = new System.Net.NetworkCredential("Email Sender @ Domain", "PWD");
 Smtp.Send(MailMesaji);
 MessageBox.Show("mail Send");
 
Share this answer
 
Have a look at this Microsoft Video tutorial:
Use ASP.NET to send Email from Website[^]
Tutorials on sending Email in ASP.NET[^]
 
Share this answer
 
look these links
Article1[^]
Article2[^]
Article3[^]
Article4[^]
 
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