Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   C++ Builder (https://www.clubdelphi.com/foros/forumdisplay.php?f=13)
-   -   Cambiar nombre adjunto con IdMessage (https://www.clubdelphi.com/foros/showthread.php?t=65042)

vivamotos 17-11-2009 17:41:43

Cambiar nombre adjunto con IdMessage
 
Buenos días

Envio un correo mediante IdMessage e IdSMTP pero no consigo cambiar el nombre del adjunto siempre sale lo que adjunto como: Attachment.tal.
Como lo puedo hacer, mirad mi codigo:
Código:

TIdAttachment *attachment = new TIdAttachmentFile(IdMessage1->MessageParts,"C:\\typhoon\\temporal_cartisa.xls");
    attachment->ContentID = "UIPSA_Albaran_"+horas[2]+"_"+grid->Cells[3][1]+".xls";
    attachment->ContentType=GetMIMETypeFromFile("C:\\typhoon\\temporal_cartisa.xls");
    attachment->FileName="UIPSA_Albaran_"+horas[2]+"_"+grid->Cells[3][1]+".xls";
    attachment->ContentTypeName="UIPSA_Albaran_"+horas[2]+"_"+grid->Cells[3][1]+".xls";
    attachment->ContentDescription="UIPSA_Albaran_"+horas[2]+"_"+grid->Cells[3][1]+".xls";
    attachment->DisplayName="UIPSA_Albaran_"+horas[2]+"_"+grid->Cells[3][1]+".xls";

Grácias


La franja horaria es GMT +2. Ahora son las 21:12:24.

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