AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

Thunderbird

Ein Thema von danten · begonnen am 27. Feb 2012 · letzter Beitrag vom 29. Feb 2012
Antwort Antwort
Seite 1 von 2  1 2   
danten

Registriert seit: 19. Feb 2012
Ort: Czech Republic, Prag
126 Beiträge
 
Delphi 10.1 Berlin Architect
 
#1

Thunderbird

  Alt 27. Feb 2012, 09:52
Hello friends,
You can tell me how Exporting email addresses from Thunderbird.

I need to format "username" and "email0" "email1" .....

thank you
Daniel
  Mit Zitat antworten Zitat
Benutzerbild von Nersgatt
Nersgatt

Registriert seit: 12. Sep 2008
Ort: Emlichheim
693 Beiträge
 
Delphi 10.1 Berlin Professional
 
#2

AW: Thunderbird

  Alt 27. Feb 2012, 09:54
As far as i remember, Thunderbird uses the mbox-format: http://en.wikipedia.org/wiki/Mbox
I should read more carefully - sorry.
Jens
  Mit Zitat antworten Zitat
danten

Registriert seit: 19. Feb 2012
Ort: Czech Republic, Prag
126 Beiträge
 
Delphi 10.1 Berlin Architect
 
#3

AW: Thunderbird

  Alt 27. Feb 2012, 10:02
My point is, decrypt the file:
C:\Users\<user_name>\AppData\Roaming\Thunderbird\P rofiles\<profile_name>\abook.mab
Daniel
  Mit Zitat antworten Zitat
Benutzerbild von Nersgatt
Nersgatt

Registriert seit: 12. Sep 2008
Ort: Emlichheim
693 Beiträge
 
Delphi 10.1 Berlin Professional
 
#4

AW: Thunderbird

  Alt 27. Feb 2012, 10:39
Take a look at this wiki-article: http://en.wikipedia.org/wiki/Mork_%28file_format%29
There are also links to the description of the format.
Jens
  Mit Zitat antworten Zitat
exilant

Registriert seit: 28. Jul 2006
134 Beiträge
 
Delphi 11 Alexandria
 
#5

AW: Thunderbird

  Alt 27. Feb 2012, 10:40
My point is, decrypt the file:
C:\Users\<user_name>\AppData\Roaming\Thunderbird\P rofiles\<profile_name>\abook.mab
The Thunderbird address book is stored in a format called "Mork". It's a very sick fileformat. Don't waste your time trying to write MORK File I/O routines. Use the Thunderbird import/export functions.

Also read on wikipedia:

"...the single most braindamaged file format that I have ever seen in my nineteen year career"
Anything, carried to the extreme, becomes insanity. (Exilant)
  Mit Zitat antworten Zitat
danten

Registriert seit: 19. Feb 2012
Ort: Czech Republic, Prag
126 Beiträge
 
Delphi 10.1 Berlin Architect
 
#6

AW: Thunderbird

  Alt 27. Feb 2012, 10:44
oops,
and is there any possibility to programmatically export the contacts?

Now I thought that the file can be found in the @ sign and read from the recording marks to marks =)
Somehow use the Pos () and Find
Daniel

Geändert von danten (27. Feb 2012 um 10:52 Uhr)
  Mit Zitat antworten Zitat
Iwo Asnet

Registriert seit: 11. Jun 2011
313 Beiträge
 
#7

AW: Thunderbird

  Alt 27. Feb 2012, 12:20
There is a plugin available for Thunderbird which adds export/import functionality to the context menu. There is a chance that you will also get the source code.
  Mit Zitat antworten Zitat
hans ditter

Registriert seit: 25. Jun 2010
Ort: Niedersachsen
263 Beiträge
 
Turbo Delphi für Win32
 
#8

AW: Thunderbird

  Alt 27. Feb 2012, 13:41
Don't know if I got you right, but in Thunderbird 10.0.2 it's possible to directly export a contact commy seperated, tabulator seperated or in LDIF format. Just open the address book, click "extras" and then export.

Hope that helps!
RudiRüsselSeineSocketKomponente - SirRufo (--> Chat mit PM)

Delphi Programming is the best one!
  Mit Zitat antworten Zitat
danten

Registriert seit: 19. Feb 2012
Ort: Czech Republic, Prag
126 Beiträge
 
Delphi 10.1 Berlin Architect
 
#9

AW: Thunderbird

  Alt 27. Feb 2012, 13:58
I have it almost done.
I need only add a piece of code.
Something like:
Delphi-Quellcode:
  for i := 0 to Memo1.Lines.Count - 1 do
  begin
   if Memo1.Lines.Text <> '@then
   begin
   ????????? Memo1.Lines[i] =>> Copy Memo2.Lines ????????????
If you can find on line and found the @ character to copy the line Memo2

Once that is functional, I put all the code here.
Daniel
  Mit Zitat antworten Zitat
danten

Registriert seit: 19. Feb 2012
Ort: Czech Republic, Prag
126 Beiträge
 
Delphi 10.1 Berlin Architect
 
#10

AW: Thunderbird

  Alt 27. Feb 2012, 14:53
OK friends, here's my code that works.

The file is loaded Memo1 abook.mab
Memo2 The resulting list is then e-mail addresses


Delphi-Quellcode:
procedure TForm1.ExtractAdress;
var
  pth,s1,s2:string;
  c1,c2,c3:integer;
  c,x,y:integer;
begin
  pth := 'C:\Users\<username>\AppData\Roaming\Thunderbird\Profiles\<profile_name>\abook.mab';
  s1 := '@';
  s2:= '<';
  memo1.Lines.LoadFromFile(pth);

  for y := 23 downto 0 do
    begin
      memo1.Lines.Delete(0);
    end;

  for c1 := 0 to Memo1.Lines.Count - 1 do
  begin
    memo1.lines[c1]:= (StringReplace(memo1.lines[c1],'=','='+#13#10,[rfReplaceAll]));
  end;

  for c2 := 0 to Memo1.Lines.Count - 1 do
  begin
    memo1.lines[c2]:= (StringReplace(memo1.lines[c2],')',''#13#10+'',[rfReplaceAll]));
  end;

  for c3 := 0 to Memo1.Lines.Count - 1 do
  begin
    memo1.lines[c3]:= (StringReplace(memo1.lines[c3],'@$${1{@','',[rfReplaceAll]));
    memo1.lines[c3]:= (StringReplace(memo1.lines[c3],'@$$}1}@','',[rfReplaceAll]));
    memo1.lines[c3]:= (StringReplace(memo1.lines[c3],'@$${3{@','',[rfReplaceAll]));
    memo1.lines[c3]:= (StringReplace(memo1.lines[c3],'@$$}3}@','',[rfReplaceAll]));
    memo1.lines[c3]:= (StringReplace(memo1.lines[c3],'@$${4{@','',[rfReplaceAll]));
    memo1.lines[c3]:= (StringReplace(memo1.lines[c3],'@$$}4}@','',[rfReplaceAll]));
    memo1.lines[c3]:= (StringReplace(memo1.lines[c3],'@$${5{@','',[rfReplaceAll]));
    memo1.lines[c3]:= (StringReplace(memo1.lines[c3],'@$$}5}@','',[rfReplaceAll]));
  end;

  for c := Memo1.Lines.Count - 1 downto 0 do
  begin
  if AnsiPos(s1, Memo1.Lines[c]) <> 0 then
    Memo2.Lines.Add(Memo1.Lines[c]);
  end;

  for x := Memo2.Lines.Count - 1 downto 0 do
  begin
  if AnsiPos(s2, Memo2.Lines[x]) <> 0 then
    Memo2.Lines.Delete(x);
  end;
end;
Daniel

Geändert von danten (27. Feb 2012 um 15:12 Uhr)
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 1 von 2  1 2   

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:29 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz