Ver Mensaje Individual
  #2  
Antiguo 20-02-2007
Avatar de ContraVeneno
ContraVeneno ContraVeneno is offline
Miembro
 
Registrado: may 2005
Ubicación: Torreón, México
Posts: 4.738
Reputación: 23
ContraVeneno Va por buen camino
Código Delphi [-]
with FormaPrin.SMTP do begin
   try
    try
     Connect;
    except on E:Exception do begin
     messagebox(Handle,'No se pudo establecer la conexión.','Error.',MB_oK+MB_ICONERROR);
     end; //fin except
    end; // fin try - except
   finally
    if Connected then begin
      PostMessage.FromAddress:=strOrigen;
      PostMessage.ToAddress.Text:=edtMail0.Text;
      if edtMail1.Text<>'' then
        PostMessage.ToCarbonCopy.Text:=edtmail1.text;
      with PostMessage.Body do begin
       Clear;
       Add(edtHTML.Text);
      end; //with body
       PostMessage.Subject:=edtAsunto.Text;
       SendMail;
       Disconnect;
     end; //if connected
    end; //fin try - finally
   end; //with smtp
__________________

Responder Con Cita