سؤال

Fellas,

Getting the "Cannot get IIS pickup directory" exception with my app. I have my directory created and specified in the config as follows:

<system.net>
  <mailSettings>
    <smtp deliveryMethod="PickupDirectoryFromIis" from="donotreply@mysite.com">
      <specifiedPickupDirectory pickupDirectoryLocation="C:\inetpub\email\mysite"/>
    </smtp>
  </mailSettings>
</system.net>

Trying to have the emails placed locally in a directory so I can see them.

Any ideas why it could be throwing that exception?

FWIW, this is IIS7 + Windows 7 and an MVC2 app (C#).

Also, went ahead and gave permissions to the IIS_IUSRS group to that directory.

هل كانت مفيدة؟

المحلول

All,

Seems like I was using the wrong smtp deliveryMethod. I got the PickupDirectoryFromIis and SpecifiedPickup deliveryMethod's mixed up, and hence was using the wrong settings for it.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top