Hi
I am getting COMException when trying to send an email within a Windows Service. The Windows Service is the SMTP service and therefore runs under IIS which runs as Local System. The operating system is Windows Server 2008 R2 (64bit).
If I put the same code inside a console application it works fine. The delivery method is
client.DeliveryMethod = Aspose.Network.Mail.SmtpDeliveryMethod.PickupDirectoryFromIis
Here is the stack trace from Event Log.
Message: Could not send email, exception System.Runtime.InteropServices.COMException (0x80004002): No such interface supported
at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_AdsObject()
at System.DirectoryServices.PropertyValueCollection.PopulateList()
at System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry, String propertyName)
at System.DirectoryServices.PropertyCollection.get_Item(String propertyName)
at Aspose.Network.Mail.SmtpClient.xb29a7e60cc957867()
at Aspose.Network.Mail.SmtpClient.Send(MailMessage message, MailAddress sender)
Regards
Richard....