以你用的nmsmtp:
begin
nmsmtp1.PostMessage.FromAddress:=Edit4.Text; //发信人的电子邮件地址
nmsmtp1.PostMessage.ToAddress.Text:=Edit5.Text;//收信人
nmsmtp1.PostMessage.ToBlindCarbonCopy.Add(Edit8.Text);//暗送
nmsmtp1.PostMessage.ToCarbonCopy.Add(Edit7.Text);//抄送
nmsmtp1.PostMessage.Subject :=Edit6.Text;//主题
nmsmtp1.PostMessage.Attachments.AddStrings(listbox1.items);//附件
nmsmtp1.PostMessage.Body.Text:=Memo1.Text+memo2.text;//内容
nmsmtp1.SendMail;
其中listbox1里面显示的就是附件:
procedure TForm4.fujianClick(Sender: TObject);
begin
If OpenDialog1.Execute then
ListBox1.Items.Add(OpenDialog1.FileName);
end;