1
我正在尝试将电子邮件发送到Active Directory通讯组。如何从c#web应用程序通过电子邮件发送Active Directory通讯组?
我知道你可以使用像发送邮件:
mail.From = new MailAddress("[email protected]");
mail.To.Add("[email protected]");
//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);
但是,当我试图在(有效)AD组坚持(如“我的测试组”)在To
领域,它踢它因为它不是一个有效的电子邮件地址。
我敢肯定,这确实是简单,但我似乎被卡住......
感谢
我怀疑这可能是这样,现在只要我能找到它:D – inspite 2008-11-20 11:29:47