Re: TIdSMTP socket error

Giganews Newsgroups
Subject: Re: TIdSMTP socket error
Posted by:  Man Utd (NOalanpltseSP…@yahoo.com.au)
Date: Fri, 6 May 2005

I figured the reason is the SMTP server setting is incorrect.

But now another problem is when sending the message:
fSMTP.Send(mailMessage);

I got an exception:
EIdProtocolReplyError with message 'Relay rejected for policy reasons.'

"Man Utd" <NOalanpltseSP…@yahoo.com.au> wrote in message
news:F1284664B9C9E240NOalanpltseSP…@yahoo.com.au...
>I tried to send email using TIdSMTP component, however, I got the error:
> class EIdSocketError with message 'Socket Error #11004'
>
> This occurred at when I connect the SMTP:
>
> fSMTP := TIdSMTP.Create(nil);
> mailMessage := TIdMessage.Create(nil);
> with mailMessage do
> begin
>      Sender.DisplayName := 'Mandy';
>      Sender.Address := '1…@hotmail.com';
>      ReplyTo.EMailAddresses := '1…@hotmail.com';
>      Subject := 'Testing';
>      Recipients.EMailAddresses := 'howarey…@hotmail.com;
> end;
> fSMTP.Host := 'smtp.mycompany.com';
> fSMTP.Port := 25;
> fSMTP.Username := 'myname';
> fSMTP.Password := 'mypassword';
> fSMTP.Connect();
> fSMTP.Send(mailMessage);
>
> Any wrong with my code ?

Replies

In response to

TIdSMTP socket error posted by Man Utd on Fri, 6 May 2005