如何打开电子邮件中的多个同名附件,然后将附件的发件人移至电子表格?
我有一份实习工作,最近被分配了清理电子邮件列表的繁琐任务。我的雇主向我发送了一系列电子邮件,其中包含退回的电子邮件附件,一次发送很多封电子邮件,且名称均相同。我已经考虑过最有效地做到这一点的方法,我希望避免像奴隶一样点击。我的想法是使用 autohotkey 的语言创建一个宏,但我觉得批处理文件或某种 Perl 可能会做同样的事情。有人可以告诉我如何做到这一点,特别是使用批处理文件吗?提前致谢!
I have an internship and was recently assigned the tedious task of cleaning the email lists. My employer has sent me a series of email with email bounces as attachments, many at a time, all with the same name. I have considered ways of doing this most efficiently, I'm looking to avoid just clicking through like a slave. My thoughts were to create a macro using autohotkey's language, but I feel like maybe a batch file or some sort of Perl might do the same thing. Could anybody give me an idea as to how to do this, specifically with a batch file? Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Mail::DeliveryStatus::BounceParser 解析送达报告消息中的退回电子邮件地址。
Mail::DeliveryStatus::BounceParser parses bouncing email addresses out of delivery report messages.
如果您不懂 Perl,那么我建议您首先将邮箱转换为某种格式,将每封电子邮件存储在单独的文本文件中,例如 MH 或类似的。
此时,您可以轻松使用命令 grep _pattern_ | sed -e 's/:.*//' |排序|独特的> _list_ 获取所有匹配
_pattern_
的文件的列表。您可以检查/编辑此文件_list_
以验证是否获得了所需的结果。然后,您可以创建另一个director
junk
或其他任何东西,并使用perl -e之类的命令将
。_list_
中列出的所有文件移动到junk
中'咀嚼;重命名($_,“垃圾”);' < _列表_如果您经常需要这个,那么您可以进一步自动化它,可能单独使用 perl,但是一次性任务可能会涉及更多关于获取正确消息列表的混乱。
或者,您可以将所有电子邮件加载到健全的邮件阅读器(如 Mac OS X 的 Mail.app)中的单个文件夹中,并执行简单的搜索、全选、移动/删除命令。
If you don't know any perl, then I recommend that you first convert the mailbox into some format that stores each email in separate text files, like MH or similar.
At that point, you can trivially use the command
grep _pattern_ | sed -e 's/:.*//' | sort | uniq > _list_
to obtain lists of all files matching_pattern_
. You may inspect/edit this file_list_
to verify that the desired results were obtained.You may then create another director
junk
or whatever and move all the files listed in_list_
intojunk
with a command likeperl -e 'chomp; rename($_,"junk");' < _list_
.If you'll need this regularly, then you could automate this further, likely using perl alone, but a one off task will probably involve more messing about with getting the right message list.
Alternatively, you could load all the emails into a single folder in an sane mail reader, like Mac OS X's Mail.app, and do simply search, select all, move/delete commands.