473,657 Members | 2,806 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.Deli verymethod = Deliverymethod. SpecifiedPickup Directory"

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 "SpecifiedPicku pDirectory", 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 4847
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.Deli verymethod = Deliverymethod. SpecifiedPickup Directory"

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 "SpecifiedPicku pDirectory", 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 "MyCustomPickup Directory" 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 "MyCustomPickup Directory" 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
8779
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 will probably use a hyperlink with a unique ID, but I also want to know how to go about reading from a mailbox with Php so I can use an email reply method, too. I'm having trouble finding any kind of tutorial. From the bit of searching I've done,...
3
24952
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 whether the cdoSMTPServerPickupDirectory field of the Message object defaults and whether it's normal to have to set this value explicitly. My W2K workstations and servers function OK without this
7
3512
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 administrator told me to write the emails to the “pickup directory” instead. I know that JMail can do this in ASP, but how do you do this in asp.net? -- --------------------
2
3287
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 MailMessage() eMail.BodyFormat = MailFormat.Text eMail.To = "recipients@hotmail.com"
4
6882
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. System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage("test@testing.com", "test@test.com",
5
11100
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 resolve this problem? Thank you very much in advance, Chieko
1
4050
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 = Encoding.UTF8; objMailMsg.Subject = strSubject; objMailMsg.Body = strMsg; Attachment at = new Attachment(Server.MapPath(AttachmentPath));
2
1861
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 writing is not possible... How can I do? Thank you very much in advance Carmelo
8
14936
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 "AAA" or the value(CCC content) that named "CCC". ///////////////////////////////////////////////////////////////////// <?xml version="1.0" encoding="utf-8" ?> <A> <resource name="AAA">AAA content</resource> <B> <resource name="BBB">BBB...
0
8833
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8737
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8610
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7345
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5636
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4327
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2735
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1967
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1730
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.