gpt4 book ai didi

javascript - Jspdf 生成的 pdf 需要将其作为附件附加到电子邮件中

转载 作者:行者123 更新时间:2023-11-29 19:52:20 25 4
gpt4 key购买 nike

我已经通过 Jspdf 生成了 pdf,需要作为附件附加到电子邮件中。

我在 jspdf 中搜索了选项,但没有找到选项,您知道如何在 jquery/JS 中执行此操作吗?

-SM

最佳答案

您只需要对其进行编码并将其放入您的电子邮件中。使用相同的技术嵌入图像。

enter image description here

查看所有详细信息 here

更新

是的,上面的示例显示了如何在电子邮件中嵌入图像。正如我所说,可以使用相同的方法来附加文件。例如,我的邮箱中有以下邮件:

enter image description here

已通过以下方式附加:

enter image description here

我希望到目前为止一切都清楚。请注意“Content-Disposition”。

您知道如何在 jquery/JS 中执行此操作吗?

为此,您需要一些服务器端代码。我建议使用 PHPMailer

A PHP email creation and transport class featuring file attachments, SMTP servers, CCs, BCCs, HTML messages, word wrap, and more. Sends email via sendmail, PHP mail(), QMail, or with SMTP.

或者使用Amazon SES

Amazon Simple Email Service (Amazon SES) is a highly scalable and cost-effective bulk and transactional email-sending service for businesses and developers.

请查看SendRawEmail

Sends an email message, with header and content specified by the client. The SendRawEmail action is useful for sending multipart MIME emails. The raw text of the message must comply with Internet email standards; otherwise, the message cannot be sent.

现在应该很清楚了。

关于javascript - Jspdf 生成的 pdf 需要将其作为附件附加到电子邮件中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17334460/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com