Cannot get IIS pickup directory

Discussion in 'Email Support' started by TexasHiking, Oct 16, 2007.

  1. TexasHiking

    TexasHiking Perch

    With some recent code rollouts emailing a C# ASP.Net app of mine has been failing with the following error:

    Cannot get IIS pickup directory

    The code works on my local box, but not when uploaded to Jodohost's servers. I've found conflicting information on the net about this from IIS meta database being corrupt to changing the mail server to localhost (which it already is), etc. Has anyone else has experiences with this on Jodohost servers? Has Jodohost changed the permissions on the pickup directory on their servers?

    Here's the C# that I use to send the email:

    MailMessage msg = new MailMessage();
    msg.IsBodyHtml = false;
    msg.From = new MailAddress(TextBoxEmail.Text, TextBoxName.Text);
    msg.To.Add(new MailAddress(Globals.Settings.ContactForm.MailTo));
    msg.Subject = string.Format(Globals.Settings.ContactForm.MailSubject, TextBoxTopic.Text);
    msg.Body = TextBoxMessage.Text;
    new SmtpClient().Send(msg);


    Here's a snippet from my web.config (email address changed):

    <mailSettings>
    <smtp deliveryMethod="PickupDirectoryFromIis" from="[email protected]">
    <network defaultCredentials="true" host="(localhost)" port="25"/>
    </smtp>
    </mailSettings>

    Do I need to use the "network" deliverymethod instead of PickupDirectoryFromIIs now and use mail.foobar.com as the smtp host?

    I could have sworn that this used to work in the past on the production servers, so I'm a bit confused.
  2. tanmaya

    tanmaya APAC Operations Staff Member

    Any test URL for us?
  3. TexasHiking

    TexasHiking Perch

    Well, not anymore. I went ahead and did what I hinted at in the original post. I modified my config file to use the network method with a valid login and everything worked great. As it turns out this is probably a better thing to do anyway since I think that fewer providers will reject delivery of the emails.

    Thanks for the reply!
  4. Stephen

    Stephen US Operations Staff Member

    You are correct, using SMTP Auth you have rDNS confirmed and more reliable delivery :)

Share This Page

JodoHost - 26,000 hosting end-users in 100 countries
Plesk Web Hosting
VPS Hosting
H-Sphere Web Hosting
Other Services