Fórum Anexar aqruivo no indy 10 #383394
11/08/2010
0
Valdelir Castanheiro
Curtir tópico
+ 0Posts
11/08/2010
Frost
Valdeir
Veja se te ajuda, delphi 2010
Ex.
Uses : IdAttachmentFile procedure TForm1.btenviarClick(Sender: TObject); var Anexo : Integer; begin Message.From.Address := ' '; Message.Recipients.EMailAddresses := ' '; Message.Subject := 'Teste'; for Anexo := 0 to Listanexo.Items.Count-1 do TIdAttachmentFile.Create(Message.MessageParts, Tfilename(Listanexo.Items.Strings[Anexo])); SMTP.Connect; try SMTP.Send(Message); finally SMTP.Disconnect(); Message.Body.Clear; Message.MessageParts.Clear;
Gostei + 0
11/08/2010
Valdelir Castanheiro
TidAttachament.Create(IdMessage.MessageParts, TFileName('C:\Sistemas\Acertos\Arquivos\A'+IntToStr(Contador)+DatIniNom+DatFimNom+'.txt'));
Gostei + 0
11/08/2010
Fernando Farah
Gostei + 0
11/08/2010
Eriley Barbosa
Gostei + 0
11/08/2010
Fernando Farah
bye
Gostei + 0
12/08/2010
Valdelir Castanheiro
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)