如何用indy构件组发送有附件的e-mail(10分)

  • 主题发起人 主题发起人 abnertan
  • 开始时间 开始时间
A

abnertan

Unregistered / Unconfirmed
GUEST, unregistred user!
小弟我最近由delphi6的indy组件来编写发送e-mail的程序,发现了一个问题:
以前,我用fastnet中的NMsmtp来编程,但他有个缺点:无法进行身份验证。在delphi6中,
indy构件组d的IDsmtp,IDmessage倒解决了这个问题,
但我找来找去也找不到如何加入邮件附件的方法(以前NMsmtp倒有attachment属性,可用indy应该如何做呢?)
小弟我至今百思不得其解,特向富翁们请教。[:(]
 
TIdAttachment.Create(Idmessage.MessageParts, Filename)
就可以了


 
NMsmtp控件也可以用来身份验证啊,用UserID属性啊
 
接受答案了.
 
能发多个附件吗?怎么实现?
 
发多个:
TIdAttachment.Create(Idmessage.MessageParts, Filename1)
TIdAttachment.Create(Idmessage.MessageParts, Filename2)
TIdAttachment.Create(Idmessage.MessageParts, Filename3)
.............
就可以了

 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
2K
DelphiTeacher的专栏
D
后退
顶部