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