Please note that there is no C# on the client side of course, so basically the question is either send mail using Javascirpt OR send mail on the server side using C#.
This is an example for C#, as requested:
MailMessage mail = new MailMessage("recipient@hisDomain.com", "you@yourdomain.com");
SmtpClient client = new SmtpClient();
client.Port = 25;
client.DeliveryMethod = SmtpDeliveryMethod.Network;
client.UseDefaultCredentials = false;
client.Host = "smtp.google.com";
mail.Subject = "The subject.";
mail.Body = "Body text here";
client.Credentials = new NetworkCredential("account@gmail.com", "password");
client.Send(mail);
Cheers,
Edo