如何使用PHP中的数据库中的内容将HTML文件附加到电子邮件? [英] How to attach HTML file to email using content taken from DB in PHP?
本文介绍了如何使用PHP中的数据库中的内容将HTML文件附加到电子邮件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何通过PHP附件的HTML文件发送邮件? - > HTML文件(代码)的内容是在DB中的字符串。有没有一些简单的方法或自由脚本来做到这一点?我不想存储文件localy,我需要从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屋!
查看全文