将传入电子邮件集成到 php/mysql 应用程序中

发布于 2024-09-01 07:40:15 字数 320 浏览 2 评论 0原文

我正在寻找创建一个传入电子邮件守护程序交换机,我可以将其与各种远程 php/mysql 应用程序集成。理想情况下,我想检查“收件人”地址,看看它是否在 mysql 数据库中,如果是,则解析电子邮件并通过 CURL 将电子邮件发布到目标目的地,并将附件保存在本地某处。

我可能会设置一个专门用于此任务的机架空间云服务器(仅接受电子邮件并发布到第 3 方 API)。然而,我不知道从哪里开始。我应该使用哪个服务器平台/发行版?需要定制哪些软件等等?

更新:我并不是在寻找完整的解决方案或教程,我只是想要一些关于良好起点的建议,因为 Linux 软件不是我的强项。

I am looking to create an incoming email daemon switchboard that I can integrate with various remote php/mysql apps. Ideally I want to check the 'to' address to see if it is in a mysql database and if it is, have the email parsed and posted via CURL to a target destination as well as have attachments saved somewhere locally.

I will likely set up a rackspace cloud server dedicated to this task (just accepting emails and posting to 3rd party APIs). However, I do not know where to start. Which server platform / distribution should I go with? Which software needs to be customized, etc?

Update: I am not looking for a full solution or tutorial, I just would like some advice on a good starting point as Linux software is not my forte.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

谁许谁一生繁华 2024-09-08 07:40:15

您可以在收到邮件后立即使用 procmail 启动您的应用程序
谷歌搜索 procmail 食谱

you can use procmail to fire up your application as soon as mail has been received
google for procmail recipes

终遇你 2024-09-08 07:40:15

这个项目将由两部分组成:邮件服务器和挖掘应用程序:

邮件服务器:

  • 开始使用此项目的最简单方法是将邮件发送到 gmail 之类的东西。然后,使用 gmail 的读取功能(可能通过多个第三方 gmail api 之一)来获取消息。显然,您不必在本文中使用 Gmail,但这可能是一个很好的入门方法。

挖掘应用程序:一旦您可以阅读邮件,您需要在此处执行两项主要任务:

  • 跟踪消息:跟踪您已经挖掘的消息。这可能并不像“我已经看过这个日期之前的所有内容”那么简单。
  • 挖掘它:使用正则表达式查看消息中是否包含您要查找的术语。如果是这样,请向您的服务发送一个 HTTP post(按照您的建议通过 CURL),该服务获取这些内容并将它们转储到数据库中(或者您想要对它们执行的任何操作。)

You're going to have two pieces with this project: The mail server and the mining application:

Mail Server:

  • The easiest way to get started with this is have your mail sent to something like gmail. Then, use gmail's read functionality (probably through one of the several thrid party gmail apis) to get the message. You don't have to use gmail for this piece, obviously, but it might be a good way to get started.

Mining app: Once you can read mail you need to do two major tasks here:

  • Track the messages: Keep track of messages you've already mined. This probably is not as simple as "I've already looked at everything before this date."
  • Mine it: Use a regex to see if the message has the term you're looking for. If it does, send an HTTP post (via CURL as you suggested) to your service that takes these things and dumps them in a DB (or whatever you want to do with them.)
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文