• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 474
  • Last Modified:

iPhone - Can't Open HTML attachments sent with PERL + MIME::Lite

I have a program written in PERL that generates HTML email and includes a HTML file as an attachment. Works fine, always has. Can view the attachments in email clients and online however I can't crack the iPhone problem. I see the email, I see the inline html and logo in the message body, I can even see the paperclip indicating an attachment..... but.... I can't see, view or open the attachment.

Howerver... if I take the same file and attach it in Outlook, then send to the iPhone the attachment can be opened
my $sendEmail = MIME::Lite->new(
    From          => $sVars[1],
    FromSender    => $sVars[1],
    To            => $sVars[0],
    Cc            => $sVars[2],
    Bcc           => $sVars[3],
    Subject       => $sVars[4],
    Type          => "multipart/related",
    Datestamp     => $sendDate
    )
    or die "Error Creating Message: $!\n";

  $sendEmail->attach(
    Type        => "text/html",
    Data        =>  $INLINE_HTML
    );

    # Header Graphic referenced in $INLINE_HTML
    $sendEmail->attach(
      Type        => "image/jpeg",
      Id          => "emailHdr.jpg",
      Path        => $ImgPath."/emailHdr.jpg",
      Filename    => "emailHdr.jpg"
      );

      $sendEmail->attach(
        Type        => "text/html",
        Id          => "TEST.html",
        Path        => $PATH."/TEST.html",
        Filename    => "TEST.html",
        Disposition => "attachment"
        )
        or die "Error Attaching File: $!\n";

  $sendEmail->send('sendmail',SetSender=>1);

Open in new window

0
Bob-Villa
Asked:
Bob-Villa
1 Solution
 
Carl BohmanCommented:
Have you tried sending the e-mails somewhere that you can get at the raw message and then comparing both e-mails to see what's different?  Have you tried comparing the full headers to see if there are any important differences there?  Perhaps iPhone doesn't like the "multipart/related" type?  Have you tried another type?
0
 
Bob-VillaAuthor Commented:
lol. multipart/mixed fixed the issue. Thanks for the tip.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now