Forum Moderators: phranque

Message Too Old, No Replies

exporting e-mail contents to text file...doable?

         

esllou

12:37 pm on May 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I receive twenty e-mails a day with just one line of text in them....that I then need to copy and paste into a text file.

question: is there any way to get all the contents easily into a text file without going through each one individually and copying and pasting?

would save me lot of menial work every day....

jatar_k

2:16 pm on May 16, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



It really depends

does the mail come from one of your servers? If so then a different approach could be used to put them all in a file then email you only once.

Do they all come from the same place or to the same exact address. You could maybe use a mail processor like procmail (though it is for unix).

encyclo

2:22 pm on May 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The emails may already reside in a text file, depending on what mailbox format your messages are stored in. For example, the standard "mbox" format is one long text file for a folder's contents, one message after the other. If it is the case, then you just need to redirect all these messages into a separate folder, then copy and parse the folder file for the appropriate parts of the content.

What email client do you use (Outlook, Eudora...), and what platform do you work on (Windows, Linux...)?

esllou

2:42 pm on May 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



thanks guys for the responses so far...

more details

the mails are all from my site....forms with newsletter subscriptions. all come to the same yahoo address.

I use outlook to pick them up and use win xp.

my host is a unix though I am a bit of an idiot when it comes to doing super techie stuff, though have been known to follow slow and clear instructions! :-)

encyclo

3:04 pm on May 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Outlook uses a closed format (PST) for storing emails, so I don't think you can extract them, and I don't think PST is a text format. Does Outlook offer any email export possibilities (to mbox format or to a CSV file)? Is the email address you mention used exclusively for receiving these messages, or are they mixed in with others?

If all the mail to that one address consists of these messages, you could use a different email client program like Eudora or Mozilla Mail / Mozilla Thunderbird (which all use the mbox format) to get the emails. From there, you would need something like VBScript to parse the file and extract the info... (I'm just brainstorming here!) You could still use Outlook for your normal mail.

jatar_k

3:06 pm on May 16, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



if they are all from your site then why not change the way you mail them to yourself

I assume that each time someone signs up for the newsletter it mails you their email address?

you could just have it append it to a file instead and then have a nightly script run to send you all the email adrresses in the file and empty the file.

You could also amintain this on the server as well and not worry about it emailing it to you every time. A database would possibly be helpful as well.

esllou

3:49 pm on May 16, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



just looked into outlook exporting the messages to a text file and it doesn't seem possible. which is a shame as that would be a nice, low-tech solution

jatar_k: yeah, that was the type of solution I was thinking about. Where would I find a simple script that could do that?