Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Jan : Re: tidSMTP Socket Error 10061 while sending e-mail
| Subject: | Re: tidSMTP Socket Error 10061 while sending e-mail |
| Posted by: | "Michael Fullerton" (fullerm@spamkiller-remove.cybermatrix.com) |
| Date: | Tue, 23 Jan 2007 11:51:38 |
"Franz" <fandreani@cosmag.it> wrote:
>Hello all
>I receive a socket error 10061 just sending an e-mail from a program
>compiled with Delphi 2006 and indy 10 This is the code:
10061 means failed to connect. The SMTP server is refusing your
connection. Maybe you need to use authentication. If you don't I
always add:
SMTP.AuthType := atNone;
If you do add:
SMTP.AuthType := atDefault;
SMTP.Username := 'MyEMailLoginID';
SMTP.Password := 'MyEMailPassword';
> //setup SMTP
> SMTP.Host := MailHost
> SMTP.Port := 25;
>
> //setup mail message
> MailMessage.From.Address := FromAddress
> MailMessage.Recipients.EMailAddresses := edDestinatario.Text;;
> MailMessage.Subject := edOggetto.Text;
> MailMessage.Body.Text := meMessaggio.Text;
> //send mail
> try
> try
> SMTP.Disconnect;
> SMTP.Connect(SMTP.Host, 1000);
>---- socket error
>what's wrong?
>thank you for helping me
>
>Franz
>
___
Free Project Time Tracker for Delphi Developers
http://www.cybermatrix.com/pcdelphi.html