Erro no TIdAttachment
28/04/2004
0
Olá,
Estou desenvolvendo uma aplicação Web (HTML) utilizando a palheta indy
e o componente SMTP, quando anexo um arquivo na maquina cliente via Web, o CGI não encontra o arquivo, pq ??
Código:
TIdAttachment.create(IdMessage.MessageParts, TFileName(´c:\Arquivo.txt´));
Se o arquivo existir no servidor ai não dá erro, como faço ele saber que tem que pegar o arquivo da maquina cliente e nao server ???
Valeu !!!!
Estou desenvolvendo uma aplicação Web (HTML) utilizando a palheta indy
e o componente SMTP, quando anexo um arquivo na maquina cliente via Web, o CGI não encontra o arquivo, pq ??
Código:
TIdAttachment.create(IdMessage.MessageParts, TFileName(´c:\Arquivo.txt´));
Se o arquivo existir no servidor ai não dá erro, como faço ele saber que tem que pegar o arquivo da maquina cliente e nao server ???
Valeu !!!!
Fabioluis
Curtir tópico
+ 0
Responder
Posts
22/10/2005
Alexandre Krepe
No delphi 2005 houve uma pequena mudança mesmo.
Declare no Uses: IdAttachmentFile, e substitua o TIdAttachment por TIdAttachmentFile ficando assim:
for xAnexo := 0 to ListBox1.Items.Count-1 do
TIdAttachmentFile.create(idmessage.MessageParts, TFileName(ListBox1.Items.Strings[xAnexo]));
Declare no Uses: IdAttachmentFile, e substitua o TIdAttachment por TIdAttachmentFile ficando assim:
for xAnexo := 0 to ListBox1.Items.Count-1 do
TIdAttachmentFile.create(idmessage.MessageParts, TFileName(ListBox1.Items.Strings[xAnexo]));
Responder
22/10/2005
Alexandre Krepe
ainda não testei acabei de achar no Script Brasil Forum http://www.scriptbrasil.com.br/forum/index.php?act=ST&f=21&t=53110
Responder
Clique aqui para fazer login e interagir na Comunidade :)