title: How do I email Active Directory distribution groups from a c# web application?
body: <p>I'm trying to send email to Active Directory distribution groups. </p>
  
  <p>I know you can send mail using something like:</p>
  
  <pre><code> mail.From = new MailAddress("steveb@microsoft.com");
   mail.To.Add("billg@microsoft.com");
  
   //set the content
   mail.Subject = "This is an email";
   mail.Body = "this is a sample body with html in it.";
   mail.IsBodyHtml = true;
  
   //send the message
   SmtpClient smtp = new SmtpClient("127.0.0.1");
   // i seem to need this too....
   smtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
   smtp.Send(mail);
  </code></pre>
  
  <p>But when I try to stick in a (valid) AD group (eg "My Test Group") in the <code>To</code> field, it kicks it out because it is not a valid email address. </p>
  
  <p>I'm sure this is really straightforward, but I seem to be stuck...</p>
  
  <p>Thanks</p>