How to attach blob file into HTML href=“mailto:”

前端 未结 2 841
生来不讨喜
生来不讨喜 2021-01-21 02:07

I have a file available through an URL (need authorization). I created a mailto: link and would like to attach this file in the mail. How can I do that ?

Something like

2条回答
  •  粉色の甜心
    2021-01-21 02:43

    If you're hoping for an universal solution, you can't. The mailto protocol described in the RFC 2368 tells us :

    The creator of a mailto URL cannot expect the resolver of a URL to understand more than the "subject" and "body" headers.

    Even though other headers might be used and understood by some mail clients, this isn't an universally compatible solution. Unless you tell your clients to open these links specifically with a specific mail client that you know supports more headers (like a hypothetical attachment header), you should consider this to not be doable.

提交回复
热议问题