PDA

Ver la Versión Completa : Cambiar nombre adjunto con IdMessage


vivamotos
17-11-2009, 17:41:43
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:
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