接收电子邮件消息并根据内容响应的脚本 [英] Script that receives email message and responds depending on content

查看:116
本文介绍了接收电子邮件消息并根据内容响应的脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

主题行有点过于笼统。我想告诉我

关于可以接收电子邮件和调用其他脚本的脚本

,具体取决于这些消息的内容。


谢谢!

解决方案

Bill Bell写道:


主题行有点太笼统了。我想告诉我

关于可以接收电子邮件和调用其他脚本的脚本

,具体取决于这些消息的内容。


谢谢!



我已经实现了一个守护进程,它定期解析本地服务器上的一个

邮箱,并对内容做了各种各样的事情。

消息(处理消息中的元标记,存档

附件到NAS等)。我首先要说的是,虽然完全可以用PHP做到这一点,但它可能不是最好的选择(当然,我的意见是b $ b。)


如果你更具体地了解你想要做什么,你可能会得到更好的答案。例如,您的脚本可以与邮件服务器位于同一台机器上,或者您是否需要使用IMAP来检索

消息(这要复杂得多) ?是否会手动或定期启动流程

,还是会一直运行?您打算如何处理消息中的信息?


Jeremy


< blockquote> 2008年1月2日星期三23:07:28 +0100,Jeremy< je **** @ pinacol.comwrote:


Bill Bell写道:


>主题行有点过于笼统。我希望你告诉我
关于可以接收电子邮件和调用其他脚本的脚本
取决于这些消息的内容。
谢谢!



我已经实现了一个守护进程,它定期解析本地服务器上的一个

邮箱,并对内容做了各种各样的事情。

消息(处理消息中的元标记,存档

附件到NAS等)。我首先要说的是,虽然完全可以用PHP做到这一点,但它可能不是最好的选择(当然,我的意见是b $ b。)


如果你更具体地了解你想要做什么,你可能会得到更好的答案。例如,您的脚本可以与邮件服务器位于同一台机器上,或者您是否需要使用IMAP来检索

消息(这要复杂得多) ?是否会手动或定期启动流程

,还是会一直运行?您打算如何处理消息中的信息?



我知道有perl脚本(主要在故障单系统中)

是收到邮件的应用程序,而不是一个cronjob

inbox poller。需要更多访问服务器,然后只需要一些

共享主机。

-

Rik Wasmus


1月2日下午4:56,Bill Bell< Bell .... @ gmail.comwrote:


主题是有点太笼统了。我想告诉我

关于可以接收电子邮件和调用其他脚本的脚本

,具体取决于这些消息的内容。


谢谢!



安装Procmail

配置.procmailrc将传入的邮件传递给脚本,该脚本解析

内容

您正在寻找并采取适当的措施(例如调用

其他脚本,

更新数据库等)


我使用perl来做,虽然我想你也可以使用php。


faulkes


The subject line is a little too general. I would like you to tell me
about scripts that can receive email messages and call other scripts
depending on the content of these messages.

Thanks!

解决方案

Bill Bell wrote:

The subject line is a little too general. I would like you to tell me
about scripts that can receive email messages and call other scripts
depending on the content of these messages.

Thanks!

I have implemented such a thing as a daemon that periodically parses a
mailbox on the local server and does various things with the content of
the messages (processing meta tags inside the message, archiving
attachments to NAS, etc). Let me first say that while it is entirely
possible to do this in PHP, it is probably not the best choice (my
opinion, of course).

If you''re more specific about what you are trying to do, you''ll probably
get better answers. For example, can your script sit on the same
machine as the mail server, or do you need to use IMAP to retrieve the
messages (which is far more complicated)? Will the process be initiated
manually, or periodically, or will it always be running? What sort of
things do you intend to do with the information in the messages?

Jeremy


On Wed, 02 Jan 2008 23:07:28 +0100, Jeremy <je****@pinacol.comwrote:

Bill Bell wrote:

>The subject line is a little too general. I would like you to tell me
about scripts that can receive email messages and call other scripts
depending on the content of these messages.
Thanks!


I have implemented such a thing as a daemon that periodically parses a
mailbox on the local server and does various things with the content of
the messages (processing meta tags inside the message, archiving
attachments to NAS, etc). Let me first say that while it is entirely
possible to do this in PHP, it is probably not the best choice (my
opinion, of course).

If you''re more specific about what you are trying to do, you''ll probably
get better answers. For example, can your script sit on the same
machine as the mail server, or do you need to use IMAP to retrieve the
messages (which is far more complicated)? Will the process be initiated
manually, or periodically, or will it always be running? What sort of
things do you intend to do with the information in the messages?

There are perl scripts that I know of (mainly in trouble ticket systems)
that ARE the application that recieves the mail, instead of a cronjob
inbox poller. Requires some more access to the server then just some
shared hosting though.
--
Rik Wasmus


On Jan 2, 4:56 pm, Bill Bell <Bell....@gmail.comwrote:

The subject line is a little too general. I would like you to tell me
about scripts that can receive email messages and call other scripts
depending on the content of these messages.

Thanks!

Install Procmail
Configure .procmailrc to pipe incoming mail to a script which parses
the content
you are looking for and take appropriate actions (such as calling
other scripts,
updating a database, etc.)

I use perl to do it, although I imagine you could use php as well.

faulkes


这篇关于接收电子邮件消息并根据内容响应的脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆