I am trying to read out the mailroot-path for the Drop and Pickup folders for my SMTP Virtual Server Domain. I currently need this for domains created with IIS 6.0 but in the long run will also need my Application to be compatable with IIS 7. Can anybody give me some pointers on how to do this?
Thanks!
Further details:
What I have: SMTP Virtual Server Domain with a local alias: mydomain
What I want: The mailroot path (default: C:\inetpub\mailroot) where the Badmail, Drop, Pickup and Queue folders are to be found. If that is not possible, then at least the path to the Drop folder
Why do I want this? E.g. using IIS 6.0, users can change the Drop directory to a user specific location. I therefore do not want to hardcode the path, but read it out using c#.
I have tried to find this information by:
Reading out virtual directories
Checking the iisWebSite Properties
SmtpDeliveryMethod.PickupDirecotryFomIis
System.Net.Mail.IisPickupDirectory.GetPickupDirectory() --> cannot find Method
Reading the smtp.PickupDirecotryLocation into a string --> returns an empty string
Would really appriciate any help/ideas!