473,503 Members | 2,167 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can we read an email from a specified pickup directory in c#?

theGeek
11 New Member
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 = Deliverymethod.SpecifiedPickupDirectory"

This could be needed so that a service periodically checks if there are any emails in the pick up folder, if so send those to actucal recipients.

When the delivery method is specified as "SpecifiedPickupDirectory", the mails are not actually sent out to recipients but saved to the pick up directory. How do we read the mails from there and then actually send them to the recipients?
Oct 30 '07 #1
7 4831
Frinavale
9,735 Recognized Expert Moderator Expert
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 = Deliverymethod.SpecifiedPickupDirectory"

This could be needed so that a service periodically checks if there are any emails in the pick up folder, if so send those to actucal recipients.

When the delivery method is specified as "SpecifiedPickupDirectory", the mails are not actually sent out to recipients but saved to the pick up directory. How do we read the mails from there and then actually send them to the recipients?
It sounds as if you have not attempted to solve this problem
The experts on this site are more than happy to help you with a specific problem but aren't going to solve the problem for you.

What have you tried so far to solve this problem?
Are you using Outlook?
Could this article help you at all?
Oct 30 '07 #2
theGeek
11 New Member
It sounds as if you have not attempted to solve this problem
The experts on this site are more than happy to help you with a specific problem but aren't going to solve the problem for you.

What have you tried so far to solve this problem?
Are you using Outlook?
Could this article help you at all?
HI Frinavale

First thanks for reading my query.

It seems quite illogical to say that I didn't try to solve the problem. Obviously if I faced the problem I must have also tried to solve it. The only thing is I couldn't really get the solution. I tried finding it out on google as well with searches like "reading emails from a specified pickup directory" but didn't get the desired.

Then I came to know about this forum over which the "more priviledged" in terms of knowledge usually help the less priviledged.

However, as I guess that cuz I didn't mention my efforts to get the solution in original post has perhaps led you to think that. And that simply cuz mentioning that I didn't get any fruitful results of my efforts was more or less useless to explain my problem.

Anyways, my problem is still the same - if I send a mail to "a specific pick up folder" and NOT TO IIS PICKUP FOLDER, how do I read the mail from there to send it actually in C#?

That would really be great if I could get help from the experts here:)
Nov 1 '07 #3
Frinavale
9,735 Recognized Expert Moderator Expert
HI Frinavale

First thanks for reading my query.

It seems quite illogical to say that I didn't try to solve the problem. Obviously if I faced the problem I must have also tried to solve it. The only thing is I couldn't really get the solution. I tried finding it out on google as well with searches like "reading emails from a specified pickup directory" but didn't get the desired.

Then I came to know about this forum over which the "more priviledged" in terms of knowledge usually help the less priviledged.

However, as I guess that cuz I didn't mention my efforts to get the solution in original post has perhaps led you to think that. And that simply cuz mentioning that I didn't get any fruitful results of my efforts was more or less useless to explain my problem.

Anyways, my problem is still the same - if I send a mail to "a specific pick up folder" and NOT TO IIS PICKUP FOLDER, how do I read the mail from there to send it actually in C#?

That would really be great if I could get help from the experts here:)
I take it you aren't using Outlook..and that article didn't help.

Since these emails are saved in a file in the folder...have you tried to just manipulate these files directly?
Nov 1 '07 #4
r035198x
13,262 MVP
HI Frinavale

First thanks for reading my query.

It seems quite illogical to say that I didn't try to solve the problem. Obviously if I faced the problem I must have also tried to solve it. The only thing is I couldn't really get the solution. I tried finding it out on google as well with searches like "reading emails from a specified pickup directory" but didn't get the desired.

Then I came to know about this forum over which the "more priviledged" in terms of knowledge usually help the less priviledged.

However, as I guess that cuz I didn't mention my efforts to get the solution in original post has perhaps led you to think that. And that simply cuz mentioning that I didn't get any fruitful results of my efforts was more or less useless to explain my problem.

Anyways, my problem is still the same - if I send a mail to "a specific pick up folder" and NOT TO IIS PICKUP FOLDER, how do I read the mail from there to send it actually in C#?

That would really be great if I could get help from the experts here:)
That's a well written post for a geek (except for the "cuz" that you were putting in there).
Will CdoSendUsing help?
Nov 1 '07 #5
theGeek
11 New Member
That's a well written post for a geek (except for the "cuz" that you were putting in there).
Will CdoSendUsing help?
Thanks r035198x! :)

But that I already am using to send the mail to a specified custom pick up folder.

And problem is how to get that saved mail from that specified custom pickup folder and then send it to the recipients specified in the to, cc, bcc list of the mail.
Nov 2 '07 #6
theGeek
11 New Member
I take it you aren't using Outlook..and that article didn't help.

Since these emails are saved in a file in the folder...have you tried to just manipulate these files directly?
Hi Frinavale

Thanks for that article!

Though it didn't help me in solving my problem, it did let me know how could I read the mails from Outlook.

However, to make my problem clear, here is what I am doing and want to do:

Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3. pickupDirLocation = Server.MapPath(Request.ApplicationPath) + "/MyCustomPickupDirectory/"
  4.  
  5. System.Net.Mail.SmtpClient theSmtpClient = new 
  6. System.Net.Mail.SmtpClient();
  7.  
  8. smtpClient.PickupDirectoryLocation = pickupDirLocation;
  9.  
  10. smtpClient.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.SpecifiedPickupDirectory;
  11.  
  12. smtpClient.Send(theMsg); 
  13. //where theMsg is System.Net.Mail.MailMessage
  14.  
  15.  
The above code will save the message in "MyCustomPickupDirectory" which is not a folder of outlook or any such mailing product.

I wish to do the above thing so that the mail gets saved in the folder and user can continue working on the page without delay. I can have a seperate sevice that reads the mail messages saved in the above folder and then send them to the to, cc & bcc lists as specified in the mail message itself.

My problem is, I am not getting a clue as to how can I read the mail message saved in "MyCustomPickupDirectory" in the form of System.Net.Mail.MailMessage or any such object which lets me treat the message like a message instead of a plain stream file or something.

Interop.Outlook, as I know, can be used only to deal with messages & folders in Outlook(please correct if I am wrong). How do I deal with messages stored in any of such non-standard folders?
Nov 2 '07 #7
vengadeshkannappan
2 New Member
dear all,

I need to read mail from outlook.how i can read, path from the mail...anybody can reply me.

thanks & regards,
<email snipped>
Feb 20 '08 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

12
8745
by: Chuck Anderson | last post by:
Can anyone point me in the right direction? I want to use Php to automate confirmation of someone joining an email list by them replying to an email (so they don't have to have a browser?). I...
3
24884
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
3501
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
3274
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...
4
6870
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
11095
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...
1
4036
by: =?Utf-8?B?TWlrZQ==?= | last post by:
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 =...
2
1852
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...
8
14915
by: =?Utf-8?B?WVhR?= | last post by:
I want to do the multi-language program, save the language text in XML file, but how to read the specified node value? the xml is below, for example, i want to get the value(AAA content) that named...
0
7205
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7287
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7353
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7011
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4689
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3170
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
401
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.