473,320 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Cannot get IIS pickup directory

Hi guys,

I'm using this code to generate emails and it's working in my machine:

// Create the mail message
MailMessage objMailMsg = new MailMessage(strFrom, strTo);
objMailMsg.BodyEncoding = Encoding.UTF8;
objMailMsg.Subject = strSubject;
objMailMsg.Body = strMsg;
Attachment at = new Attachment(Server.MapPath(AttachmentPath));

objMailMsg.Attachments.Add(at);
objMailMsg.Priority = MailPriority.High;
objMailMsg.IsBodyHtml = true;
//prepare to send mail via SMTP transport
SmtpClient objSMTPClient = new SmtpClient();
objSMTPClient.DeliveryMethod =
SmtpDeliveryMethod.PickupDirectoryFromIis;
objSMTPClient.Send(objMailMsg);

But, doing the same thing in other machine(having VS.Net express) the
program is giving me this error:"Cannot get IIS pickup directory"
what could the problem.
Thanks

--
Regards,
M.Rochdi
Aug 27 '07 #1
1 4032
On Aug 27, 10:10 am, Mike <M...@discussions.microsoft.comwrote:
Hi guys,

I'm using this code to generate emails and it's working in my machine:

// Create the mail message
MailMessage objMailMsg = new MailMessage(strFrom, strTo);
objMailMsg.BodyEncoding = Encoding.UTF8;
objMailMsg.Subject = strSubject;
objMailMsg.Body = strMsg;
Attachment at = new Attachment(Server.MapPath(AttachmentPath));

objMailMsg.Attachments.Add(at);
objMailMsg.Priority = MailPriority.High;
objMailMsg.IsBodyHtml = true;
//prepare to send mail via SMTP transport
SmtpClient objSMTPClient = new SmtpClient();
objSMTPClient.DeliveryMethod =
SmtpDeliveryMethod.PickupDirectoryFromIis;
objSMTPClient.Send(objMailMsg);

But, doing the same thing in other machine(having VS.Net express) the
program is giving me this error:"Cannot get IIS pickup directory"
what could the problem.

Thanks

--
Regards,
M.Rochdi
http://wss3.agileer.com/Lists/Posts/...llPosts%2Easpx

Aug 27 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Alan Howard | last post by:
Hi there, I can't seem to find any info on this error message that's generated when sending email with CDO: "The pickup directory path is required and was not specified" Does anyone know...
7
by: Lau | last post by:
I need to send 1000 emails from an asp.net website. Normally I would use System.Web.Mail.MailMessage() to send thru an SMTP server. But the large amount of emails results in a timeout. My server...
2
by: Samuel | last post by:
Hi, I am not too sure how to send email with System.Web.Mail using Pickup directory. The following is what I have ==================================================== eMail = new...
1
by: Benny Ng | last post by:
Dear All, Now I just finished my winform application. And a part of that is to send email reminder to the users. It's working fine in the server that with SMTP service in Windows 2003. But now...
1
by: mpaine | last post by:
Hi, I am trying to write .eml files to a remote UNC directory - do you know if this could be done, such as: <mailSettings> <smtp> <network
4
by: AndyNY | last post by:
We are using asp.net 2.0 to send email to the pickup folder but are getting an error: Cannot get IIS pickup directory the code is rather simple we are testing with. ...
5
by: =?Utf-8?B?bW9tbw==?= | last post by:
Hello, I've been having a prlbem sending an email using ASP.net 2.0 I can send an email if “To” address is hotmail, gmail or yahoo but not other addresses. Does anyone know how I can...
7
theGeek
by: theGeek | last post by:
Hello all! My problem is: "How can we read an email from a specified pickup directory to which the mails were sent using SmtpClient.Send after setting the SmtpClient.Deliverymethod =...
2
by: carmelo | last post by:
Hi, I created an ASP page for sending email messages. I'd like to write these messages directly into the C:\Inetpub\mailroot\Pickup directory. The problem is that when the IIS SMTP is active...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shllpp 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.