Skip to content

Missing Filename in mimepart.pas when content-location is available #18

@TetrisSQC

Description

@TetrisSQC

Solution:

procedure TMIMEPart.DecodePartHeader;
var
n: integer;
s, su, fn: string;
st, st2: string;
begin
Primary := 'text';
FSecondary := 'plain';
FDescription := '';
Charset := FDefaultCharset;
FFileName := '';
//was 7bit before, but this is more compatible with RFC-ignorant outlook
Encoding := '8BIT';
FDisposition := '';
FContentID := '';
fn := '';
for n := 0 to FHeaders.Count - 1 do
if FHeaders[n] <> '' then
begin
s := FHeaders[n];
su := UpperCase(s);
if Pos('CONTENT-LOCATION:', su) = 1 then
begin
FileName := Trim(SeparateRight(s, ':'));
end;

Christian

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions