Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 May : Socket Error # 10054 - Attached file
| Subject: | Socket Error # 10054 - Attached file |
| Posted by: | "Pablo Morales" (pmoral..@alfabeta.net) |
| Date: | Fri, 19 May 2006 11:29:50 |
Error in an attached file
Hi!
I am trying to send you some mails with their components Indy (version 10)
and Delphi 7. I have the follow problem:
Socket Error # 10054
Connection reset by peer
The error appears only when I try to send an attached file with the mail.
If I erase the line
tIdAttachmentFile.create(unMensaje.messageParts,
'c:\ver.sql');
the mail goes perfectly!
I send you the source code.
I thanks you to pay atention to my ask!
Best wishes
********************************
unSmtp.Username := 'xxxx';
unSmtp.Password := 'xxxx';
unSmtp.Host := 'smtp.fibertel.com.ar';
unMensaje.From.Name := deTextoEdit.Text;
unMensaje.From.Address := deMailEdit.Text;
unMensaje.Recipients.EMailAddresses := edit2.Text;
unMensaje.Subject := edit1.Text;
unMensaje.Body.Clear;
unMensaje.Body.Assign(memo1.Lines);
tIdAttachmentFile.create(unMensaje.messageParts, 'c:\ver.sql');
unSmtp.Connect;
unSmtp.Send(unMensaje);
unSmtp.Disconnect;
*****************************
Pablo A. Morales