data:=TStringList.Create;
data.Add('This is a text');
mm:=TMIMEMess.Create;
mm.header.from:='gl@hwd-world.de';
mm.header.ToList.add('vertrieb@hwd-world.de');
mm.header.subject:='A test';
Part := mm.AddPartMultipart('Mixed', nil);
mm.AddPartText(data, Part);
tmp := TMemoryStream.Create;
try
tmp.LoadFromFile('C:\temp\bild1.jpg');
mm.AddPartBinary(tmp, 'bild1.jpg',part);
finally
tmp.Free;
end;
mm.EncodeMessage;
SendToEx('me@email.com','me@email.com', 'Hey','
smtp.email.com', MM.Lines, '','');