LanX has asked for the wisdom of the Perl Monks concerning the following question:

Brethren!

That's slightly off topic because it's more about mime than about Perl. (though many "Perl" questions here are mostly about the targeted technology)

I have the requirement to send HTML emails containing newsletters and displaying attachments not only inline as icon-images BUT also opening those attachments by clicking on that image...

The requirement comes from Lotus Notes ("LN") where my clients normally drag and drop PDFs into the email in a WYSIWYG manner. And recipients using LN see those mails in excatly the same way like composed...

Well not if I test with Gmail web client°, you just see a text like (See attached File: xxx.pdf) and looking into the generated HTML doesn't reveal any Mime magic:

<html><body> <p><i>(Siehe angeh=E4ngte Datei: Newsletter 04-15 deu.pdf)</i>

I somehow doubt that LN is parsing for a German text to display an attachment inlined and supposed it's just displaying the email from the database and all recipients outside the Intranet will see the same thing like in my gmail browser.

Is that the case or am I missing something?

Is there an reliable way to link in line to an attachment such that it is opened on click?

(mostly need a confirmation for my client... =)

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

°) can't test otherwise because of firewall restrictions

Replies are listed 'Best First'.
Re: (OT) Linking to an attachment from within a HTML email
by Corion (Patriarch) on Mar 14, 2016 at 14:48 UTC

    First of all, I would try to remove Gmail as intermediary. Most likely, Gmail rewrites (the HTML of) your email or maybe renders the text part instead of rendering the HTML part.

    Find a (trustworthy) mail server where you can access the likely unmodified mail via IMAP or the mail program.

      True ... Gmail rewrites a lot!

      Alternatively somehow explains to me the wicked path to see the raw mail's text in Lotus Notes.

      Didn't you mention using it? ;-)

      Cheers Rolf
      (addicted to the Perl Programming Language and ☆☆☆☆ :)
      Je suis Charlie!

        You can get a small window in the "original" mail headers of Lotus Notes emails by going to the "Properties" tab of a document and there selecting the "ruler" tab. There you get a small window which shows the textual representation of (for example) the "Body" property.

        Lotus Notes is "just" a document store with some predefined properties and rendering. Notes emails have a different internal representation and don't necessarily look like the mails you receive after they go through MIME encoding.

        Also see getnotes.pl, Extract Lotus Notes Mail to HTML

        > True ... Gmail rewrites a lot!

        but in this case a chose "Original anzeigen" ( ~ "Display original") which as far as I can see really shows the original.

        For instance embedded src="data:image/gif;base64, images are not purged like in the end display.

        Cheers Rolf
        (addicted to the Perl Programming Language and ☆☆☆☆ :)
        Je suis Charlie!

Re: (OT) Linking to an attachment from within a HTML email
by Anonymous Monk on Mar 14, 2016 at 15:37 UTC
    See 'mht', thats your keyword, mhtml, mimehtml