title: Delphi: Send email through Outlook with multiple attachments
body: <p>Hello all experts,</p>
  
  <pre><code>procedure TForm1.domail(Sender: TObject; fromname, fromadd, sub, toadd, thedocdone, theacc: string; body: widestring);
  const
    olMailItem = 0;
  var
    Outlook: OLEVariant;
    vmailitem: variant;
    Attachment: TIdAttachment;
    savetofol: string;
  begin
    try
      Outlook := GetActiveOleObject('Outlook.Application');
    except
      Outlook := CreateOleObject('Outlook.Application');
    end;
    vmailitem := Outlook.CreateItem(olMailItem);
    vmailitem.Recipients.Add(toadd);
    vmailitem.ReplyRecipients.Add('email@email.com');
    vmailitem.Subject := sub;
    vmailitem.body := 'SENT: ' + formatdatetime('dd mmmm yyyy - hh:nn am/pm', now) + #13#10 + body;
    vmailitem.ReadReceiptRequested := true;
    vmailitem.importance := 2;
    if thedocdone &lt;&gt; 'NIL' then
    begin
      vmailitem.Attachments.Add(thedocdone, 1, 1, 'SBSA_' + theacc);
      if ansipos('string1', lowercase(toadd)) &lt;&gt; 0 then
      begin
        vmailitem.Attachments.Add('*manual path', 1, 2, '*manual name');
        Memo1.Lines.Add('Adding consent letter to mail...');
      end;
      if ansipos('string2', lowercase(toadd)) &lt;&gt; 0 then
      begin
        vmailitem.Attachments.Add('*manual path', 1, 2, '*manual name');
        Memo1.Lines.Add('Adding consent letter to mail...');
      end;
      savetofol := extractfilepath(thedocdone) + copy(extractfilename(thedocdone), 0, length(extractfilename(thedocdone)) - 8);
      vmailitem.saveas(savetofol + '_eml.doc', 4); // ^ +'.doc'
    end;
    // vmailitem.clear;
    vmailitem.Send;
    Outlook := Unassigned;
  end;
  </code></pre>
  
  <p>With the above piece of code i am able to attach to outlook and send out an email and attach an attachment to that mail...</p>
  
  <p>My problem is that IT WONT attach the 2nd attachment... ??? i have tried every which way using different methods to do this but i just cannot get the 2nd attachment to attach to the mail...</p>
  
  <p>Please help...</p>