如何使用从PHP中获取的内容将HTML文件附加到电子邮件? [英] How to attach HTML file to email using content taken from DB in PHP?

查看:141
本文介绍了如何使用从PHP中获取的内容将HTML文件附加到电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过PHP附加HTML文件发送邮件? - > HTML文件(代码)的内容是DB中的字符串。有没有一些简单的方法或免费的脚本来做到这一点?我不想存储文件本地,我需要从DB中读取它,并将其作为附件发送(不包括在正文中)。

How do I send mail via PHP with attachment of HTML file? -> Content of HTML file (code) is in string in DB. Is there some easy way or free script to do this? I don't want to store the file localy, I need to read it out of DB and send it straightaway as attachment (not included in body).

推荐答案

如果您很难得到标题,您可以随时使用 PHP Mailer 而不是重新发明轮。

If you have a hard time getting the headers right, you can always use something like PHP Mailer instead of reinventing the wheel.

这篇关于如何使用从PHP中获取的内容将HTML文件附加到电子邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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