cakephp 编写 doc/docx
在用户注册时,我想通过电子邮件发送带有附件的文档,它应该包含动态用户保护名称到文档中,您对 cakephp 的此类组件/帮助程序有任何了解吗?
尽早回复将不胜感激。
谢谢 !
On user registration, I want to email with attachment a document and it should contain dynamic user guarding name, into document, do you have any idea about such component/helpers with cakephp?
Earliest reply would be appreciated.
Thanks !
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定你所说的“动态用户保护名称”是什么意思,但是如果你可以发送 RTF 文件而不是 doc/docx,我在 RTF 文件中看到的一个技巧是按照你想要的方式保存模板在电子邮件中,但在文档中要替换变量的地方使用类似 %%VARIABLE%% 的内容。
然后,要发送文件,您可以让 PHP 解析它,并将 %%VARIABLE%% 替换为您要插入的名称,并将该文件作为附件发送。
doc 和 docx 文件是二进制文件,我不知道如何处理。通常 RTF(事实并非如此)适用于 Word 文件。
我希望我理解你的问题,这会有所帮助。
I'm not sure what you mean by "dynamic user guarding name," but a trick I saw with an RTF file if you can send an RTF file instead of doc/docx is to save a template as you'd like it to go in the email, but use something like %%VARIABLE%% in the document wherever you want to replace a variable.
Then, to send the file, you have PHP parse it and replace the %%VARIABLE%% with the name you want to insert and send that file as the attachment.
The doc and docx files are in binary and I don't know how to handle that. Usually RTF, which is not, works for word files.
I hope I understood your question and this helps.