如何将Blob文件附加到HTML href =“" mailto:"中 [英] How to attach blob file into HTML href="mailto:"

查看:183
本文介绍了如何将Blob文件附加到HTML href =“" mailto:"中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个通过URL提供的文件(需要授权).我创建了一个mailto:链接,并希望将此文件附加到邮件中.我该怎么办?

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 ?

类似"mailto:toto@gmail.fr& attachment = site.com/file.pdf"

Something like "mailto:toto@gmail.fr&attachment=site.com/file.pdf"

推荐答案

mailto:不支持附件,但是有多种方法可以实现类似的效果:

mailto: doesn't support attachments, but there are various ways you could achieve a similar effect:

  1. 链接到邮件正文中的文件

  1. Link to the file in a message body

您提到链接需要授权,您可以生成持续30分钟(或更多/更少)的临时URL,以允许下载(用户可以自己附加文件)

You mentioned that the link needs authorisation, you could generate temporary urls that last 30 minutes (or more/less) which allow for downloads (users can then attach the file themselves)

亲自发送电子邮件

您的服务可以使用 Amazon SES Mailchimp 等...

Your service could send an email to your user (or on behalf of your user) with the attachment using something like Amazon SES, or Mailchimp, etc...

将PDF呈现为HTML

Render your PDF into HTML

似乎您正在计划附加PDF文件.根据PDF文件的复杂程度,您可以尝试使用 工具之一,例如 pdf2htmlEX

It seems you are planning on attaching PDF files. Depending on the complexity of the PDF files, you could attempt to convert the PDF into email-friendly HTML using one of many tools, such as pdf2htmlEX or Pandoc.

这篇关于如何将Blob文件附加到HTML href =“" mailto:"中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆