简体   繁体   English

Wordpress-发布时将帖子发送到管理员电子邮件?

[英]Wordpress - send post to admin email when posting?

I have a niche website that needs to allow users to post events and other things to the website. 我有一个利基网站,需要允许用户将事件和其他内容发布到该网站。 Wordpress works perfectly for this option (as well as other needs). Wordpress非常适合此选项(以及其他需求)。 The problem is, there is also a weekly newsletter (published as a PDF file) that gets sent to a large opt-in email list. 问题是,还有一个每周新闻通讯(以PDF文件形式发布)被发送到较大的选择加入电子邮件列表中。 Is there any way to configure Wordpress (via plugin or hack) to send the CONTENTS of the post to the admin in a csv or rtf file of some sort? 有什么方法可以配置Wordpress(通过插件或黑客程序)以某种形式的csv或rtf文件将帖子的内容发送给管理员? The posts themselves will have several custom fields. 帖子本身将具有几个自定义字段。 Most of the stuff I churn up when I search for "post to email" for Wordpress is the other way around, for people wanting to send an email and have that post to their site, which is not what I want to do. 当我搜索Wordpress的“发布到电子邮件”时,我想到的大部分内容都是相反的,对于那些想要发送电子邮件并将其发布到自己网站的人来说,这不是我想要做的。 I suppose other ideas of getting around my problem are open to consideration too. 我想解决问题的其他想法也是可以考虑的。 Thanks!! 谢谢!!

One way I am thinking you could accomplish this but haven't tested it. 我认为您可以完成此操作但尚未测试的一种方法。 You could make a php script to parse the rss feed and email that contents. 您可以制作一个php脚本来解析rss提要并通过电子邮件发送该内容。 Depending on whether how many posts get done in a week, you could either create a function for it to fire after the post is posted; 根据一周内完成多少帖子,您可以创建一个函数使其在帖子发布后触发; or have a cron job on it and send it once a week before the newsletter is to be sent. 或在上面进行Cron作业,并在要发送时事通讯之前每周发送一次。 Sorry I'm not in front of my machine that has WP installed to test it out. 抱歉,我不在安装WP的计算机前进行测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM