Skip to content

Commit 7a66aac

Browse files
committed
FIX: [mail] Read header in offline mails.
1 parent d2e1b47 commit 7a66aac

File tree

4 files changed

+31
-19
lines changed

4 files changed

+31
-19
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
- ADD: [convers] Seperate window for convers.
1919
- ADD: [convers, main] Remember window position.
2020
- ADD: [tray] Button to show convers window.
21+
- FIX: [mail] Read header in offline mails.
22+
- ADD: [mail] Offline mail support for LinBPQ.
23+
- ADD: Progressbar to show the state of message/file download.
24+
- ADD: BBS Type in statusbar.
2125

2226
## v0.7.0
2327

src/flexpacket.lps

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
<HasResources Value="True"/>
1919
<ResourceBaseClass Value="Form"/>
2020
<UnitName Value="UMain"/>
21-
<IsVisibleTab Value="True"/>
2221
<EditorIndex Value="15"/>
23-
<TopLine Value="737"/>
22+
<TopLine Value="738"/>
2423
<CursorPos X="33" Y="758"/>
2524
<UsageCount Value="210"/>
2625
<Loaded Value="True"/>
@@ -228,9 +227,10 @@
228227
<ComponentName Value="FListMails"/>
229228
<HasResources Value="True"/>
230229
<ResourceBaseClass Value="Form"/>
230+
<IsVisibleTab Value="True"/>
231231
<EditorIndex Value="14"/>
232-
<TopLine Value="481"/>
233-
<CursorPos X="76" Y="489"/>
232+
<TopLine Value="486"/>
233+
<CursorPos X="25" Y="499"/>
234234
<UsageCount Value="303"/>
235235
<Loaded Value="True"/>
236236
<LoadedDesigner Value="True"/>
@@ -256,7 +256,7 @@
256256
<ResourceBaseClass Value="Form"/>
257257
<EditorIndex Value="6"/>
258258
<TopLine Value="309"/>
259-
<CursorPos Y="333"/>
259+
<CursorPos X="7" Y="325"/>
260260
<UsageCount Value="247"/>
261261
<Loaded Value="True"/>
262262
<LoadedDesigner Value="True"/>

src/ulistmails.lfm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2027,7 +2027,7 @@ object FListMails: TFListMails
20272027
00000000000000000000000000000000000000000000
20282028
}
20292029
Position = poOwnerFormCenter
2030-
LCLVersion = '4.1.0.0'
2030+
LCLVersion = '4.4.0.0'
20312031
OnClose = FormClose
20322032
OnResize = FormResize
20332033
OnShow = FormShow

src/ulistmails.pas

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -478,20 +478,28 @@ function TFListMails.ParseMessageHeader(const FileName: String): TMessageHeader;
478478

479479
if sl.Count > 0 then
480480
begin
481-
Line := sl[1];
482-
Regex := TRegExpr.Create;
483-
Regex.Expression := '^(\S+).*>.*(\S+).*(\d{2}\.\d{2}\.\d{2}) (\d{2}:\d{2}z) (\d+) Lines (\d+) Bytes.*@ (\S+)';
484-
Regex.ModifierI := True;
485-
486-
if Regex.Exec(Line) then
481+
// search the bcm header
482+
for i := 0 to sl.Count - 1do
487483
begin
488-
Result.FromCall2 := Regex.Match[1];
489-
Result.ToCall2 := Regex.Match[7];
490-
Result.DateStr := Regex.Match[3];
491-
Result.TimeStr := Regex.Match[4];
492-
Result.Lines := StrToInt(Regex.Match[5]);
493-
Result.Bytes := StrToInt(Regex.Match[6]);
494-
start := 2;
484+
Line := sl[i];
485+
Regex := TRegExpr.Create;
486+
Regex.Expression := '^(\S+).*>.*(\S+).*(\d{2}\.\d{2}\.\d{2}) (\d{2}:\d{2}z) (\d+) Lines (\d+) Bytes.*@ (\S+)';
487+
Regex.ModifierI := True;
488+
489+
if Regex.Exec(Line) then
490+
begin
491+
if Regex.SubExprMatchCount >= 7 then
492+
begin
493+
Result.FromCall2 := Regex.Match[1];
494+
Result.ToCall2 := Regex.Match[7];
495+
Result.DateStr := Regex.Match[3];
496+
Result.TimeStr := Regex.Match[4];
497+
Result.Lines := StrToInt(Regex.Match[5]);
498+
Result.Bytes := StrToInt(Regex.Match[6]);
499+
start := i+1;
500+
break;
501+
end;
502+
end;
495503
end;
496504

497505
for i := start to sl.Count - 1 do

0 commit comments

Comments
 (0)