tags:

views:

332

answers:

1

I am getting following error while sending an email from the contact us form of a website

System.Net.Mail.SmtpException: Cannot get IIS pickup directory. at System.Net.Mail.IisPickupDirectory.GetPickupDirectory() at System.Net.Mail.SmtpClient.Send(MailMessage message) at UICBLL.Mail.MailSettings.SendMail(String ToAddress, String CCAddress, String BccAddress, String SubjectText, String BodyText, Boolean IsBodyHtml, MailPriority mailPriority, String[] MailAttachment) at UICPresentation.Forms.Client.contact.sendMail()

Any ideas? I can not get hold of an IIS as this is a shared hosting. Any work around?

+1  A: 

What does your code/web.config look like?

Without seeing that, do you have the pickup directory specified? For example:

SmtpClient client = new SmtpClient(hostName);
client.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
Nate
we did this but issue was still there.
abhi
You're going to have to post your code/config if you want people to help you troubleshoot.
Nate