Results 1 to 2 of 2

Thread: Cannot get IIS pickup directory.

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Dec 2003
    Posts
    4,787

    Cannot get IIS pickup directory.

    Code:
               MailAddress SendFrom = new MailAddress("[email protected]");
                
                MailAddress SendTo = new MailAddress(To);
    
                MailMessage MyMessage = new MailMessage(SendFrom, SendTo);
    
                MyMessage.Subject = subject;
                MyMessage.Body = message;
                
                SmtpClient emailClient = new SmtpClient("127.0.0.1");
                emailClient.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
                emailClient.PickupDirectoryLocation = "C:\\Inetpub\\mailroot\\Pickup\\";
    
                emailClient.Send(MyMessage);
    I get the following error message on the .Send

    Cannot get IIS pickup directory.

    The directory exists and it occurs with or without me specifiying emailClient.PickupDirectoryLocation

    There is an SMTP server on the box and its running. Its a fasthosts dedicated box if that makes a differnence.

    Any suggestions?

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Cannot get IIS pickup directory.

    That, then, usually happens if the account in IIS doesn't have permissions to access that location. If you're with fasthosts, then it is a possibility that they have configured a non-default user to run the web apps. It will also mean that they're controlling what touches what. I'm also willing to bet that you don't need a pickup directory to send emails, they must have a server you can use that isn't 127.0.0.1, but you'll need to ask them about this specific bit (the permissions)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width