Cannot get IIS pickup directory

hespinoza

Member
Joined
Oct 27, 2008
Messages
5
Programming Experience
Beginner
I feel like I'm going in circles trying to find the answer. Here's my problem:

I have a application using visual studio 2005 which after checking some information in the database (System A) and finding the required results builds a string to send email to different recipients (using SMTP System B). It works find in my developer machine (System C) and sends all the email inside our network and outside our network.

However, when I move the built exe to the production server (System D) I get the following error when sending outside our network "Cannot get IIS pickup directory"

Here's my code:

Dim mailMsg As New MailMessage(mstrFrom.Trim, SentTo.Trim)

With mailMsg
.Subject = mstrSubject
.IsBodyHtml = True
.Body = "HERE GOES THE EMAIL BODY"
End With

Dim client As New SmtpClient(mstrEmailServer)
client.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis
client.Send(mailMsg)


Any ideas?
 
I haven't tried specifying the pickup directory. How would I know which directory to use? Is that the directory where I'm running the program or the mail server? If it's the mail server, how would I ask the person in charge of that server to give me the info I need?

Sorry about my ignorance, but I'm limited in my knowledge.
 
I may be on to something the server where I'm running my program is missing the c:\inetpub\mailroot folder and subfolder. How is this initially setup? Does anyone knows?
 
Back
Top