SMTP Pickup Directory

Posted on 2004-11-02
Last Modified: 2008-03-10
Our web site is hosted under 2 different web servers.
We use a custom DLL to send mails.  This DLL is registered to both web servers.

I'm having problems sending emails because the two web servers have different pickup directories.
one uses drive c:\ while the other uses d:\.  In my code, I don't specify the pickup directory, so it always gets the default which is c:\inetpub\mailroot\pickup.  When the other server is up, it fails to send the message because it is using d:\inetpub\mailroot\pickup.  

Our administrators do not want to modify their SMTP settings. So, I guess we have to work on the code to dynamically switch to pickup directories of the current web servers.  For this, I need to have a function that will get the pickup directory of the web server. Do I need to set any other property aside from the pickupdirectory?

Question by:killer5
    1 Comment
    LVL 34

    Accepted Solution

    You could do a query on the metabase to check the pickup directory.

    In ASP you could do this with the following:

    IIsObjectPath = "IIS://localhost/smtpsvc/1"
    Set iisobject = GetObject(IIsObjectPath)

    PDir will be set to the value of the SMTP pickup directory for the 1 SMTP instance on the local machine.

    Dave Dietz

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Logparser is the smartest tool I have ever used in parsing IIS log files and there are many interesting things I wanted to share with everyone one of the  real-world  scenario from my current project. Let's get started with  scenario - How do w…
    Prologue It is often required to host multiple websites on a single instance of IIS, mostly in development environments instead of on production servers. I am sure it is not much a preferred solution on production servers but this is at least a pos…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now