Ver Mensaje Individual
  #1  
Antiguo 12-12-2012
toni.vi toni.vi is offline
Miembro
 
Registrado: may 2003
Ubicación: Sant Fost(Barcelona)
Posts: 102
Reputación: 22
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