Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Internet
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Grupo de Teaming del ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 12-12-2012
toni.vi toni.vi is offline
Miembro
 
Registrado: may 2003
Ubicación: Sant Fost(Barcelona)
Posts: 102
Poder: 21
toni.vi Va por buen camino
fichero adjunto falla mobil no en pc

Utilizo indy 9 y delphi7, y ocurre que cuando en el cuerpo del mensaje pongo una imagen en la cabecera, un cuerpo con html y adjunto un fichero, desde un pc con windows recepciono todo correctamente, pero desde un mobil, en mi caso iPhone, pero tambien en otros mobiles, el fichero adjunto no se recepciona.
¿Alguien le ha ocurrido lo mismo?
el codigo fuente es normalito, os pongo un ejemplo por si quereis reproducirlo.
Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
 html: TStrings;
 htmpart, txtpart: TIdText;
 bmppart: TIdAttachment;
 adjunto: TIdAttachment;
 email: TIdMessage;
 filename: string;
begin
 filename := 'C:\Documento\Header.jpg';
 html := TStringList.Create();
 html.Add('');
 html.Add('');
 html.Add('');
 html.Add('

Hello

'
); html.Add(''); html.Add('This is a picture of us!'); html.Add(''); email := TIdMessage.Create(nil); email.From.Text := 'aaaa@xxxx.com'; email.Recipients.EMailAddresses := 'aaaa@xxxx.com'; email.Subject := 'Hello'; email.ContentType := 'multipart/mixed'; email.Body.Assign(html); txtpart := TIdText.Create(email.MessageParts); txtpart.ContentType := 'text/plain'; txtpart.Body.Text := ''; htmpart := TIdText.Create(email.MessageParts, html); htmpart.ContentType := 'text/html'; bmppart := TIdAttachment.Create(email.MessageParts, filename); bmppart.ContentType := 'image/jpeg'; bmppart.FileIsTempFile := True; bmppart.ContentDisposition := 'inline'; bmppart.ExtraHeaders.Values['content-id'] := 'Header.jpg'; bmppart.DisplayName := 'Header.jpg'; adjunto := TIdAttachment.Create(email.MessageParts, 'C:\Documento\bbbb.pdf'); try idSMTP.Connect(); try idSMTP.Send(email); ShowMessage('Sent'); except on E: Exception do ShowMessage('Failed: ' + E.Message); end; finally idSMTP.Disconnect(); email.Free(); html.Free(); end; end;
Responder Con Cita
Respuesta



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Chanfle, MS recrea plataformas mas rapido de lo que es humano: Mobil Edition mamcx .NET 0 10-05-2012 17:45:07
Problema con envio de correos con fichero adjunto apicito OOP 5 09-02-2012 13:29:36
Enviar mensaje (con fichero adjunto) a gmail Jose Manuel Ten Internet 2 31-07-2007 23:43:09
Localizador Mobil vtdeleon La Taberna 2 15-09-2006 22:28:12
Obtener un fichero adjunto a un nodo de un fichero XML muntasil Internet 0 18-07-2006 12:57:57


La franja horaria es GMT +2. Ahora son las 20:44:01.


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
Copyright 1996-2007 Club Delphi