Groups > WordPerfect Office > WordPerfect X3 > Re: Save a Thunderbird email to a txt file automatically




Save a Thunderbird email to a txt file automatically

Save a Thunderbird email to a txt file automatically
Sat, 05 Apr 2008 13:28:37 -040
I will have many emails coming into a specific Thunderbird email Inbox 
subfolder.

The task now is to automatically convert the body of the first email in 
that folder to a txt file, then run some macros on it, then mark or move 
it so it is not processed again, then proceed to the next email and repeat.

The name of the email (the subject line) will always have the text
Questionnaire Mark X3 in it and then a special code name something like 
[[{11A(14test01)}DrO] will also be in the subject line name.


The txt file name will always be the same; EmailData.txt and will be 
overwritten every time the macro runs.

The EmailData.txt file will be stored in C:\LifeModTest\

The email will be located in the folder QI E at



  mailbox:/C|/Documents and Settings/Jean/Application 
Data/Thunderbird/Profiles/5hzj1t1e.default/Mail/Local 
Folders/Inbox.sbd/QI E/


Once this txt file is created the email needs to be marked or moved so 
it is not processed again.

I thought moving it into an Archives folder would be a good idea.


mailbox:/C|/Documents and Settings/Jean/Application 
Data/Thunderbird/Profiles/5hzj1t1e.default/Mail/Local 
Folders/Inbox.sbd/QI Email Archives/


Is there a PerfectScript command, or a way to get a macro to look in 
that Thunderbird folder for the email?

Post Reply
Re: Save a Thunderbird email to a txt file automatically
Sat, 05 Apr 2008 16:21:10 -040
When I use this code;

Application (WordPerfect; "WordPerfect"; Default!; "EN")
FileNew ()
FileOpen (Filename:
"C:\Documents and Settings\Jean\Application 
Data\Thunderbird\Profiles\5hzj1t1e.default\Mail\Local Folders\Inbo" +
"x.sbd\QI E")

I get a whole lot of emails in one file.

When I step through the macro record steps the last folder QI E is a 
file. I want to open one of the two files in the FOLDER QI E. Is there a 
way to get to that file in the FOLDER QI E?

Vic



Victor Ouellette wrote:
> 
> I will have many emails coming into a specific Thunderbird email Inbox 
> subfolder.
> 
> The task now is to automatically convert the body of the first email in 
> that folder to a txt file, then run some macros on it, then mark or move 
> it so it is not processed again, then proceed to the next email and
repeat.
> 
> The name of the email (the subject line) will always have the text
> Questionnaire Mark X3 in it and then a special code name something like 
> [[{11A(14test01)}DrO] will also be in the subject line name.
> 
> 
> The txt file name will always be the same; EmailData.txt and will be 
> overwritten every time the macro runs.
> 
> The EmailData.txt file will be stored in C:\LifeModTest\
> 
> The email will be located in the folder QI E at
> 
> 
> 
>  mailbox:/C|/Documents and Settings/Jean/Application 
> Data/Thunderbird/Profiles/5hzj1t1e.default/Mail/Local 
> Folders/Inbox.sbd/QI E/
> 
> 
> Once this txt file is created the email needs to be marked or moved so 
> it is not processed again.
> 
> I thought moving it into an Archives folder would be a good idea.
> 
> 
> mailbox:/C|/Documents and Settings/Jean/Application 
> Data/Thunderbird/Profiles/5hzj1t1e.default/Mail/Local 
> Folders/Inbox.sbd/QI Email Archives/
> 
> 
> Is there a PerfectScript command, or a way to get a macro to look in 
> that Thunderbird folder for the email?
> 
> 
Post Reply
Re: Save a Thunderbird email to a txt file automatically
Sun, 06 Apr 2008 12:21:47 -060
Compact Folders in Thunderbird has nothing to do with removing existing 
email messages. TB saves files in a database format; hence, when you 
delete a message, the space that it used is not removed. To remove that 
now-excess space and thereby reduce the size of the folder, one uses the 
Compact Folders feature.

I am, however, quite puzzled by your statement that you removed emails, 
compacted a folder, and later found that the messages were there again. 
I've never encountered that, nor have I seen any messages on-line to 
that effect. At any rate, one does not delete wanted messages before 
compacting the folder(s).

Failure to compact on a regular basis can lead to serious problems in 
TB. Please see this document for further information (including a 
comment about 'compress' /vs./ 'compact':

http://kb.mozillazine.org/Thunderbird_:_Tips_:_Compacting_Folders

John Liebson

On 4/6/2008 11:50 AM, Victor Ouellette wrote:

> 
> Thank you Wolfgang.
> 
> My Thunderbird has a Compact option in the right click on the Inbox 
> subFolder not a compress option. When I delete all the emails in that 
> folder then click on the Compact option, nothing seems to happen but, 
> when I click on another folder then go back to my Inbox subfolder then 
> all the emails that I just deleted are back again.
> 
> Is there another method of compressing the folder in question that I do 
> not know about? I guess 'compact' and 'compress' are not the same thing.
> 
> Vic
> 
> 
> 
> 
> Wolfgang Deiminger wrote:
>>
>> Victor,
>>
>> As Roy "Lemoto" Lewis assumes, Thunderbird does store all the
mails of 
>> a Thunderbird folder in one file (as do Outlook and Outlook Express 
>> and probably most other e-mail programs). This file (that appears as a

>> folder in Thunderbird) is a text file that can be opened in a word 
>> processor (I remember opening one in WordPad to manually delete a
virus).
>>
>> So your tactics should be different: To extract one mail after 
>> another, open a copy of this file in WP. Search for the first correct 
>> subject line, delete everything above. Then search for the next 
>> subject line, cut everything above and paste it into a blank WP 
>> document. Then process it and save it (or the results) if necessary. 
>> Same procedure for the next mail etc.
>>
>> As the latest mail will always be on top of the Thunderbird file, you 
>> can proceed like that the next day too. You will just have to make 
>> sure that the mails already processed will not be processed again. 
>> This could be avoided by searching for the first mail you processed 
>> the day before and deleting that mail and everything after it.
>>
>> This gives me another idea: If you want to process the mails in the 
>> order they come in, start at the bottom of the documents. The 
>> procedure might even be easier than starting at the top.
>>
>> BTW, deleting e-mails in Thunderbird does not delete them from the 
>> file (not even if you delete them from the recycle bin as well). To 
>> really get rid of the text of deleted mails in the file, you have to 
>> "compress" that folder.
>>
>> Wolfgang
>>
>>
>>
>> On 06.04.2008 18:49,  lemoto wrote:
>>
>>> Victor:
>>>> Application (WordPerfect; "WordPerfect"; Default!;
"EN")
>>>> FileNew ()
>>>> FileOpen (Filename:
>>>> "C:\Documents and Settings\Jean\Application 
>>>> Data\Thunderbird\Profiles\5hzj1t1e.default\Mail\Local
Folders\Inbo" +
>>>> "x.sbd\QI E")
>>>
>>> There is no need for FileNew. FileOpen creates a new document.
>>>  
>>>> I get a whole lot of emails in one file.
>>>  
>>>> When I step through the macro record steps the last folder QI E
is a 
>>>> file. I want to open one of the two files in the FOLDER QI E.
Is 
>>>> there a way to get to that file in the FOLDER QI E?
>>>
>>> I do not have Thunderbird. But: most email apps store all messages
in 
>>> a "folder" (i.e: it appears as a folder in the app's user
window) in 
>>> one file.
>>
> 
Post Reply
Re: Save a Thunderbird email to a txt file automatically
Sun, 06 Apr 2008 13:26:50 -050
You will notice that the Mail folder has two names for each folder.  You 
will probably need to edit both.  What you might try is saving each as a 
TXT file.  Then delete one message.  Use WP's Compare feature to see 
what was changed in each file.  Be sure to try it with emails that do 
and do not contain attachments.  Some emails with html codes may be a 
bit different in storage as well.

Another approach may be to do the cut and paste (same as move), using 
SendKeys() or an API routine using SendMessage().  You can use 
Thunderbird to export the emails as TXT files and then change those for 
some other purposes.
Post Reply
Re: Save a Thunderbird email to a txt file automatically
Sun, 06 Apr 2008 13:50:32 -040
Thank you Wolfgang.

My Thunderbird has a Compact option in the right click on the Inbox 
subFolder not a compress option. When I delete all the emails in that 
folder then click on the Compact option, nothing seems to happen but, 
when I click on another folder then go back to my Inbox subfolder then 
all the emails that I just deleted are back again.

Is there another method of compressing the folder in question that I do 
not know about? I guess 'compact' and 'compress' are not the same thing.

Vic




Wolfgang Deiminger wrote:
> 
> Victor,
> 
> As Roy "Lemoto" Lewis assumes, Thunderbird does store all the
mails of a 
> Thunderbird folder in one file (as do Outlook and Outlook Express and 
> probably most other e-mail programs). This file (that appears as a 
> folder in Thunderbird) is a text file that can be opened in a word 
> processor (I remember opening one in WordPad to manually delete a virus).
> 
> So your tactics should be different: To extract one mail after another, 
> open a copy of this file in WP. Search for the first correct subject 
> line, delete everything above. Then search for the next subject line, 
> cut everything above and paste it into a blank WP document. Then process 
> it and save it (or the results) if necessary. Same procedure for the 
> next mail etc.
> 
> As the latest mail will always be on top of the Thunderbird file, you 
> can proceed like that the next day too. You will just have to make sure 
> that the mails already processed will not be processed again. This could 
> be avoided by searching for the first mail you processed the day before 
> and deleting that mail and everything after it.
> 
> This gives me another idea: If you want to process the mails in the 
> order they come in, start at the bottom of the documents. The procedure 
> might even be easier than starting at the top.
> 
> BTW, deleting e-mails in Thunderbird does not delete them from the file 
> (not even if you delete them from the recycle bin as well). To really 
> get rid of the text of deleted mails in the file, you have to
"compress" 
> that folder.
> 
> Wolfgang
> 
> 
> 
> On 06.04.2008 18:49,  lemoto wrote:
> 
>> Victor:
>>> Application (WordPerfect; "WordPerfect"; Default!;
"EN")
>>> FileNew ()
>>> FileOpen (Filename:
>>> "C:\Documents and Settings\Jean\Application 
>>> Data\Thunderbird\Profiles\5hzj1t1e.default\Mail\Local
Folders\Inbo" +
>>> "x.sbd\QI E")
>>
>> There is no need for FileNew. FileOpen creates a new document.
>>  
>>> I get a whole lot of emails in one file.
>>  
>>> When I step through the macro record steps the last folder QI E is
a 
>>> file. I want to open one of the two files in the FOLDER QI E. Is 
>>> there a way to get to that file in the FOLDER QI E?
>>
>> I do not have Thunderbird. But: most email apps store all messages in 
>> a "folder" (i.e: it appears as a folder in the app's user
window) in 
>> one file.
> 
Post Reply
<< Previous 1 2 3 4 Next >>
( Page 1 of 4 )
about | contact