的Automator / AppleScript的处理在Mac邮件传入电子邮件

编程入门 行业动态 更新时间:2024-10-22 15:30:09
本文介绍了的Automator / AppleScript的处理在Mac邮件传入电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我设计一个应用程序,允许用户通过电子邮件我崩溃报告,如果我的应用程序崩溃过。我想留在计算机上运行的Mac邮件,当邮件来自通过,一个剧本的Automator / AppleScript的运行来处理电子邮件的正文中的内容。

I'm designing an app that allows users to email me crash reports if my app ever crashes. I'd like to leave Mac Mail running on a computer and when an email comes through, an automator script / AppleScript runs to process the contents of the body of the email.

我有一个python脚本完成整个解析/处理,除非我必须将电子邮件的内容手动复制到一个文件,然后运行我的那个文件分析器。

I've got the entire parsing/processing done in a python script, except I have to manually copy the contents of the email into a file and then run my parser on that file.

什么是设置此所以最好的方式,我可以电子邮件的内容推入我的解析脚本?

What's the best way to set this up so I can the contents of the email be pushed into my parsing script?

非常感谢!

推荐答案

也许最简单的方法是定义一个Mail.app规则。您可以设置过滤条件,指定一组收到的电子邮件到规则应用到,你可以指定规则操作中是一个对传入邮件运行AppleScript。规则与Mail.app管理 preferences - > 规则。苹果提供与Mac OS X查看 /图书馆/脚本/邮件脚本/规则操作或搜索网页。

Probably the simplest approach is to define a Mail.app Rule. You can set up filtering conditions to specify the set of incoming email to apply the rule to and among the rule actions you can specify is one to run an AppleScript on incoming messages. Rules are managed with Mail.app Preferences -> Rules. Apple supplies examples of Rule Action scripts with Mac OS X. Look in /Library/Scripts/Mail Scripts/Rule Actions or search the web.

更多推荐

的Automator / AppleScript的处理在Mac邮件传入电子邮件

本文发布于:2023-10-12 23:32:47,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1486198.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:电子邮件   邮件   Automator   AppleScript   Mac

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!