[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SMTP Pickup Directory

Posted on 2004-11-02
3
Medium Priority
?
1,032 Views
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?

Thanks!
0
Comment
Question by:killer5
1 Comment
 
LVL 34

Accepted Solution

by:
Dave_Dietz earned 1000 total points
ID: 12484297
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=iisobject.get("PickupDirectory")
response.write(pdir)
%>

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

Dave Dietz
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

865 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