Ver Mensaje Individual
  #11  
Antiguo 08-10-2010
jimmy_aei jimmy_aei is offline
Registrado
 
Registrado: mar 2008
Posts: 8
Reputación: 0
jimmy_aei Va por buen camino
Enviar archivos adjuntos

que tal foro:

tengo un problema al tratar de enviar los archivos adjuntos, uso delphi 2009 y componentes indy 10.2 o los que vienen por default

si envia el ccorreo y todo, pero los archivos que llegan adjuntos vienen con extensión .dat, y eso es una lata, no se si a alguien ya le paso y que pudiera darm eun pocco de luz al respecto. añado mi codigo para enviar los correos:

with IdMessage do
begin
Body.Assign(dbMemo1.Lines);
From.Text := UserEmail;
ReplyTo.EMailAddresses := UserEmail;
Recipients.EMailAddresses := edtemailcte.Text; { To: header }
Subject := UserName; { Subject: header }
//Priority := TIdMessagePriority(cboPriority.ItemIndex); { Message Priority }
//CCList.EMailAddresses := edtCC.Text; {CC}
//BccList.EMailAddresses := edtBCC.Text; {BBC}
//if chkReturnReciept.Checked then
// begin {We set the recipient to the From E-Mail address }
// ReceiptRecipient.Text := From.Text;
// end
//else
// begin {indicate that there is no receipt recipiant}
ReceiptRecipient.Text := '';
// end;
end;
{authentication settings}
// case SmtpAuthType of
// 0: idSMTP.AuthType := atNone;
// 1: idSMTP.AuthType := atDefault; {Simple Login}
//end;
idSMTP.Username := SmtpServerUser;
idSMTP.Password := SmtpServerPassword;
{General setup}
idSMTP.Host := SmtpServerName;
idSMTP.Port := SmtpServerPort;
{now we send the message}
idSMTP.Connect;
try
idSMTP.Send(IdMessage);
finally
idSMTP.Disconnect;
MessageDlg('Correo enviado satisfactoriamente',mtInformation,[mbOk],0);
end;
Responder Con Cita