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:
-
-
-
pickupDirLocation = Server.MapPath(Request.ApplicationPath) + "/MyCustomPickupDirectory/"
-
-
System.Net.Mail.SmtpClient theSmtpClient = new
-
System.Net.Mail.SmtpClient();
-
-
smtpClient.PickupDirectoryLocation = pickupDirLocation;
-
-
smtpClient.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.SpecifiedPickupDirectory;
-
-
smtpClient.Send(theMsg);
-
//where theMsg is System.Net.Mail.MailMessage
-
-
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?