Drupal:如何自动发送(cck)节点内容+通过电子邮件发送文件附件
我对 Drupal 还很陌生,编程技能也非常有限。
我正在尝试使用 cck + 视图构建一个求职板网站。我创建了 2 个相关的内容类型:“职位发布”和“职位申请”——两者都使用节点引用字段相关。
职位申请节点有 4 个字段:申请者的职位 ID、申请人的电子邮件、求职信(正文字段)和附加简历(允许用户附加/上传文档的 cck 字段)。
问题:创建职位申请后,我希望将节点的内容(包括附件)通过电子邮件自动发送给发布该职位的人(目标电子邮件地址位于相关“职位发布”的抄送字段中) “节点)。
因此我的要求是:(1)自动将目标电子邮件地址从“职位发布”内容类型“转移”到“职位申请”内容类型; (2)自动将所有“职位申请”节点内容+文件附件发送至目标邮箱。
有没有任何模块可以帮助我实现这一目标?
非常感谢您的支持。
我的电子邮件地址是:[电子邮件受保护]
I am still quite new to Drupal and have very limited programming skills.
I am trying to build a job board site using cck + views. I have created 2 related content types: a "job post" and a "job application" - both are related using a nodereference field.
The job application node has 4 fields: id of the job post to which the person is applying, email of the applicant, cover letter (body field) and attached cv (cck field that allows users to attach/upload a document).
Question: Once a job application is created I would like the content of the node (including the attached file) to be automatically sent via email to the person who posted the job (destination email address is in a cck field in the related "job post" node).
Thus my requirements are: (1) to automtically "transfer" the destination email address from the "job post" content type to the "job application" content type; and (2) to automatically send all the "job application" node contents + file attachment to the destination email.
Is there any module that can help me achieve this?
Thank you so much for your support.
My email address is: [email protected]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
直接告诉你:不,没有任何模块可以做到这一点。很大程度上是因为您已经制作了大多数内容类型,并且它对于您的项目来说非常独特。
不过,您的编程技能可能并不有限,我建议您在使用 drupal 时学习它。通过编写自定义模块来创建您所要求的实际上并不难。编写自定义模块实际上并不难,并且开始在 Drupal 中编写自定义模块确实有很好的文档记录。
我可以告诉您在自定义模块中使用什么,但是如果您自己创建它(用于将来的项目)会更好。
因此,您创建了自定义模块:
此代码尚未经过测试,无法复制粘贴。然而,node_load 和 drupal_mail 以及 hook_nodeapi...使用这些函数,你就会到达那里。
To give it to you straight: No, there is no module that will do this. Largely because you have already made most content types and it is pretty unique to your project.
Still, you may not have limited programming skill, I would advice learning it when working with drupal. What you are asking is really not that hard to create by writing a custom module. Writing a custom module is really not that hard, and starting to write a custom module in Drupal is really well documented.
I can tell you what to use in the custom module, however it is better if you create it yourself (for future projects).
So you create your custom module:
This code has not been tested and can't be copy pasted. However node_load and drupal_mail as well as hook_nodeapi... use those functions and you'll get there.
Lullabot 的视频教程“学习 CCK for Drupal”基于工作申请的概念/发布网站作为案例研究。这可能值得调查。
不,我与 Lullabot 没有任何联系;只是一个 Drupaler 伙伴
Lullabot's video tutorial "Learning CCK for Drupal" is based on the concept of a job application/posting site as a case study. It may be worth investigating.
no, I'm not connected in any way to Lullabot; just a fellow Drupaler