php - Create file from string and attach to email

痞子三分冷 提交于 2019-12-06 16:44:18

Temporary files are created safely with tempnam. How you are going to call them while attaching them to a multi-part mail does not need to have anything to do with the temporary name you give the actual file. If it does in your 'mail' implementation, show that specific code, 'cause it doesn't need to be like that.

Actually, to mail it, you don't even need to create a file, just add it as a specific part to the body of the mail with proper content-encoding & boundaries, and you're done.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!