Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Go Back   Foros Club Delphi > Principal > Varios
Register FAQ Members List Calendar Guía de estilo Search Today's Posts Mark Forums Read

Coloboración Paypal con ClubDelphi

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 19/12/2018
ArtPortEsp ArtPortEsp is offline
Miembro
 
Join Date: May 2018
Location: Mexico
Posts: 176
Poder: 9
ArtPortEsp Va por buen camino
Envio de correo con Indy 10 / Delphi 7

No puedo usar la opcion de Busqueda del Foro para verificar si ya hay algun post de esto.... de antemano una disculpa si ya se ha tratado el tema
Estoy tratando de enviar correos desde mi aplicacion de Delphi 7 (cosa que ya habia logrado anteriormente), pero ahora estoy obteniendo un error que no me da mucha informacion para corregirlo....
el codigo es:
Código Delphi [-]
     ListBox2.Items.clear;
     eMessage.Body.Assign(Etexto.Lines);
     eMessage.From.Text := Ede.text;
     eMessage.Recipients.Clear;
     x:= epara.text;
     If Ansipos(';',x) > 0 Then
     begin

          While Ansipos(';',x) > 0 Do
          Begin
               eMessage.Recipients.Add.Address:=Copy(x,1,Ansipos(';',x)-1);
               x:=Copy(x,Ansipos(';',x)+1,999);
          End;          { while }
          eMessage.Recipients.Add.Address:=x;
     end
     else
         eMessage.Recipients.Add.Address:=Epara.Text;

     eMessage.Subject := easunto.Text;

     IF Efile.FileName <> '' then TIdAttachmentFile.Create(eMessage.MessageParts,Efile.FileName);

     Emessage.Priority := TidmessagePriority(mpHighest);
     if Gauth='N' then
          SMTP.AuthType := atNone
     Else
          SMTP.AuthType := atDefault;

     SMTP.Username := Gcuenta;
     SMTP.Password := Gpassword;
     SMTP.Host     := Gserver;
     SMTP.Port     := Strtointdef(Gpuerto,0);

     if GemailSSL then
     begin
          IdSSLOpenSSLHeaders.Load;
          //IdOpenSSLSetLibPath(Grutaexe);
          SMTP.IOHandler := IdSSLIOHandlerSocketOpenSSL1;
          IdSSLIOHandlerSocketOpenSSL1.SSLOptions.Method := sslvSSLv23;
          IdSSLIOHandlerSocketOpenSSL1.SSLOptions.Mode   := sslmUnassigned;
     end;

     SMTP.Disconnect;
     SMTP.Connect;
     if SMTP.Connected then
     begin

          Try
          begin
               if Fcorreo.tag <> 7 then
               begin
                    SMTP.Send(Emessage);
                    DM.Bitacora('Correo','Envio de correo electronico', '',' Destinatario ('+Epara.text+')');

                    if listbox1.Items.Count > 0 then MessageDlg('El correo y sus adjuntos fueron enviados correctamente',mtInformation,[mbOk],0)
                    else MessageDlg('El correo fue enviado correctamente',mtInformation,[mbOk],0);

                    //DeleteFile(Efile.FileName);
               end
               else
                    Fcorreo.Tag := 0;
          end
          finally
               SMTP.Disconnect;
          END;

          Close;
     end
     else
          MessageDlg('No fue posible conectar con el servidor de correos.', mtWarning, [mbOK], 0);

y el error que estoy obteniendo es:

Quote:
Project xxxxxxx raised exception class EIdSMTPReplyError with message ''
Any ideas?

btw i got the error in this line :

SMTP.Send(Emessage);

Last edited by Casimiro Noteví : 19/12/2018 at 23:27.
Reply With Quote
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sobre envío de correo en Delphi 7 lduron Varios 19 09/10/2015 17:37
enviar correo con delphi 5 e indy 9 Espartaco Varios 5 18/12/2014 12:55
Problema SuperRaro en el Envio de Correo con Indy's AGAG4 Internet 0 10/11/2006 18:04
Bug en Indy 10 con Delphi 2006 / Hora de Envío gluglu Internet 0 15/05/2006 11:09
envio de correo srangel Linux 0 22/04/2005 17:44


All times are GMT +2. The time now is 03:33.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi