É o seguinte, estou com uma rotina simples para envio de e-mails.
Ela funciona, mas quando mando e-mail para o Hotmail, dá o seguinte erro:
Realying Denied
Segue código:
procedure TfrmPrincipal.btnEnvioClick(Sender: TObject);
begin
IdSMTP1.Host := 'meuhost.com.br';
IdSMTP1.Username := 'remetente@meuhost.com.br';
IdMessage1.From.Address := 'remetente@meuhost.com.br';
IdMessage1.Subject := 'Teste Indy Delphi';
IdMessage1.Body.Text := '<html><body><b><center>Esse é o corpo do e-mail.</center></b></body></html>';
IdMessage1.ContentType := 'text/html';
IdMessage1.Recipients.EMailAddresses := 'destinatario@hotmail.com;
if not IdSMTP1.Connected then
IdSMTP1.Connect(2000);
if IdSMTP1.Connected then
begin
try
IdSMTP1.Send(IdMessage1);
finally
IdSMTP1.Disconnect;
end;
end;
ShowMessage('Enviado com Sucesso!');
end;