Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Jan : TIdSMTP problem when trying to send e-mail

www.cryer.info
Managed Newsgroup Archive

TIdSMTP problem when trying to send e-mail

Subject:TIdSMTP problem when trying to send e-mail
Posted by:"MG" (martin.georgi..@softgroup-bg.com)
Date:Fri, 25 Jan 2008 14:48:33

Hi all

I'm using Delphi 2007 and Indy 10 to send and e-mail.
I am using, TIdSMTP, TIdMessage and basicly doing this:

IdMsgSend: TIdMessage;
SMTP: TIdSMTP;
.
:

begin
    idMsgSend.Subject := 'Subject';
    idMsgSend.Body.Add('Example');

   with IdMsgSend do
   begin
     From.Text := 'user@gmail.com';
     ReplyTo.EMailAddresses := 'user@gmail.com';
     Recipients.EMailAddresses := 'recipient@gmail.com';
   end;

   SMTP.AuthType := atNone;

   SMTP.Username := 'user';
   SMTP.Password := 'pass';

   SMTP.Host := 'gmail.com';
   SMTP.Port := 25;

   SMTP.Connect;
   try
      SMTP.Send(IdMsgSend);
   finally
      SMTP.Disconnect;
   end;

I receive the following error (Project Project1.exe raised exception class
EIdSMTPReplyError with message '') on line SMTP.Send(IdMsgSend);

Whats wrong?

10x in advance.

Replies:

www.cryer.info
Managed Newsgroup Archive