title: Delphi, How can I pass a variable to a procedure from a MultiThread
body: <pre><code>procedure TForm4.WorkerThread(Thread: TMultiThreadThread;
    Parameters: TObject; var Data, Results: TObject);
  var 
    clMailMessage1 : TclMailMessage;
    myVariable : string;
  begin
    myVariable := 'A String from this Thread';
    clMailMessage1 := TclMailMessage.Create(self);
    clMailMessage1.OnSaveAttachment := clMailMessage1SaveAttachment;
    clMailMessage1.LoadMessage('myemail.eml'); 
    // The LoadMessage activates/calls the OnSaveAttachment procedure
    clMailMessage1.free;
  end;
  
  procedure TForm4.clMailMessage1SaveAttachment(Sender: TObject;
  ABody: TclAttachmentBody; var AFileName: string; var AData: TStream;
  var Handled: Boolean);
  begin
    AData := TFileStream.Create(AFileName, fmCreate);
    // saves all attachments
    // **How do I access the myVariable here from the specific calling thread ?**
  end;
  </code></pre>
  
  <p>I would like to access the myVariable from the clMailMessage1SaveAttachment procedure, but I can't figure out how.</p>
  
  <p>Some code would be nice, because this is abit over my league I guess.</p>