Save emails as file

Posted on 2011-10-19
Last Modified: 2012-05-12
We are writing a program to send out order confirmations when a person orders a product.

Every time a customer makes an order it sends an email to The Exchange server will automatically archive these emails to an EML file or save them to a text file or somthing. Our program will check every few minutes for new orders and email out confirmations.

The problem with this is that I don't know how to archive all emails sent to a specific mailbox.
Anyone know if there is a way that I can do this?
Question by:David11011
    LVL 49

    Expert Comment

    there is no way to let exchange save emails to an eml or text file
    LVL 2

    Author Comment

    Bah, there's always a way. I know that all the emails that are sent through the mail go through a virtual SMTP server and that server saves the emails in a .EML file for a brief moment in the queue folder before it  sends it out.

     I could create a new VSMTP server on a different IP that I could use to only send the emails to the address so that it would place EML files in a different queue folder than the rest of our mail. The only problem I would have to tackle here is figuring out how to get the emails to sit in the que folder long enough be copied out to another location.

    Any ideas?
    LVL 49

    Accepted Solution

    it would be much neater to change your program to retrieve pop3 from the mailbox
    LVL 2

    Author Comment

    Holy Crap! that never even crossed my mind. I figured that pulling POP3 emails off of a mailserver would be hours of coding but I just at someone else's code and it look like I can do that fairly easily. I'll give it a try and post back. ty
    LVL 2

    Author Closing Comment

    I wrote program that pulls all the emails from the mailbox via POP3 and saves them into to text files. The only problem I'm having is deleting the emails off of the mail server. I will post for hep with that in the programming section.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Set OWA language and time zone in Exchange for individuals, all users or per database.
    Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
    In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
    This video discusses moving either the default database or any database to a new volume.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now