HTML Code Link within an Email to an Email Attachment [duplicate]
Asked Answered
J

2

13

Wondering if this is possible. Suppose an email is written in HTML for email clients to render. And an anchor tag exists in the HTML code that is going to be parsed by the email client.

One can reference resources (images, files, etc..) externally from servers. For instance, I can do Download PDF

Is it possible to reference an attachment that was sent along with the email? So attach a PDF and have some tag in the email reference the attachment that's a part of the HTML code.

I don't really want to hear "alternative" solutions. I pretty much want to hear yes/no.

Johnstone answered 26/5, 2011 at 23:16 Comment(0)
A
4

Nope. Each mail client takes care of attachments individually, in their own way. If you could make it work in some clients, rest would fail.

If think that there would be more problems than use.

Ammann answered 26/5, 2011 at 23:19 Comment(0)
H
4

Answered in https://mcmap.net/q/677382/-can-an-html-email-body-reference-a-file-sent-as-an-attachment-in-the-same-email

No hacks needed. Use the cid: URI scheme

Homozygote answered 27/4, 2015 at 6:38 Comment(2)
That answer was for showing images sent as attachments (IMG tag). This question is about linking them using "A HREF".Kamikamikaze
It seems like in place of putting an image CID URI into a IMG tag, you should be able to reference it in a A tag like a URL. However, it does mean sending the file as part of the email in base 64 (4/3 size), so real URLs are nicer, as un-clicked links have no message size impact. Even if you have no web server, you should be able to share files using Google Drive and the like, much of that being free. Of course, they are exposed to public access, while a file embedded in an email is only shared by forwarding, disregarding the lack of security of email packets.Wager

© 2022 - 2024 — McMap. All rights reserved.