FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
#1
|
||||
|
||||
Smtp Indy
hola a todos, tengo una duda con el componente idSMTP de las indy que viene en Delphi6, el problema mas que nada es con un progressbar.. por que deseo que el usuario tenga a la vista graficamente el envio del mail con los archivos adjuntos.. ya probe los enventos onWORK, y OnBeginWork, pero no doy aun con nada, les agredesco desde ahora la información que me proporcionen .. nos vemos...
__________________
'seY sbaJ, K28D4! 52:11 - > Ok |
#2
|
||||
|
||||
Pues vas por buen camino...
OnWorkBegin: Cita:
Cita:
Cita:
__________________
Juan Antonio Castillo Hernández (jachguate) Guía de Estilo | Etiqueta CODE | Búsca antes de preguntar | blog de jachguate |
#3
|
||||
|
||||
Este es el código de un mailer anónimo que estube haciendo hace tiempo, cuando me pregunté cómo funcionarían estos:
Código:
SMTP1.UserID := PalabraAleatoria (6); Estado1.Caption := 'Conectando...'; try SMTP1.Connect Except ShowMessage ('Error al conectar con el servidor SMTP'); end; Estado1.Caption := 'Enviando datos...'; Progreso1.Position := 30; SMTP1.PostMessage.FromAddress := PalabraAleatoria (7)+'@'+ PalabraAleatoria (5)+'.'+PalabraAleatoria (3); SMTP1.PostMessage.FromName := PalabraAleatoria (8); SMTP1.PostMessage.ToAddress.Text := ePara.Text; SMTP1.PostMessage.Body.Text := eMensaje.Text; SMTP1.PostMessage.Subject := eAsunto.Text; Estado1.Caption := 'Enviando correo...'; Progreso1.Position := 70; SMTP1.SendMail; Progreso1.Position := 100; Estado1.Caption := 'Desconectando...'; SMTP1.Disconnect;
__________________
:) |
#4
|
||||
|
||||
Evidentemente este trozo de código no tiene nada que ver con la pregunta original, pues simplemente "asume" los porcentajes de avance del proceso de enviar un email... sin archivos adjuntos...
Hasta luego.
__________________
Juan Antonio Castillo Hernández (jachguate) Guía de Estilo | Etiqueta CODE | Búsca antes de preguntar | blog de jachguate |
#5
|
||||
|
||||
Okz, lo siento. En caso de los archivos adjuntos puedes poner otra barra de progreso en la que Max := total de bytes del adjunto y Position := los bytes que lleva
__________________
:) |
#6
|
||||
|
||||
Hola Foro, pues he investigado lo siguiente pero con el componente de FTP:
procedure TMainForm.IdFTP1WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer); begin if AWorkCountMax > 0 then ProgressBar1.Max := AWorkCountMax else ProgressBar1.Max := BytesToTransfer; End; procedure TMainForm.IdFTP1Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer); Begin ProgressBar1.Position := AWorkCount; End; Cuando la Variable BytesToTransfer anteriormente lo toma de BytesToTransfer := IdFTP1.Size(Name); Cuando ese dato en SMTP, no se de donde tomarlo ya que no tiene la misma propiedad
__________________
'seY sbaJ, K28D4! 52:11 - > Ok |
|
|
|