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 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?