如何自动从日常电子邮件附件获取脚本处理的文件?

发布于 2024-08-07 22:15:41 字数 372 浏览 5 评论 0原文

背景:每个工作日我都会收到供应商发来的电子邮件,他们向我发送了一个 CSV 文件作为附件。 CSV 文件需要转换为 HTML,我已经有一个脚本可以执行此操作。

问题是,我必须手动打开电子邮件,将附件保存到硬盘,然后针对保存的附件运行脚本。我想自动完成这一切,因为它变得乏味。

我总是必须将电子邮件附件保存到某个文件系统上某处的已知文件路径,然后针对该已知文件路径运行脚本,将其转换为不同的格式以用于报告目的。

问题:假设我可以将电子邮件和附件转发到任何地方,我如何才能自动执行此过程?是否有某种 SMTP 到 SCP 网关?如何自动将电子邮件附件转换为文件系统上具有已知路径的文件,以便可以通过脚本对其进行处理?

Background: Every work day I get an e-mail from a vendor who sends me a CSV file as an attachment. The CSV file needs to be converted into HTML and I already have a script that does that.

The problem is, I have to manually open my e-mail, save the attachment to my hard drive and then run the script against the saved attachment. I would like to do this all automatically because it is getting tedious.

I always have to save the e-mail attachment to a known file path on some file system somewhere and then run a script against that known file path to convert it to a different format for reporting purposes.

Question: Assuming I can forward the e-mail and attachment anywhere, how can I automate this process? Is there some kind of SMTP to SCP gateway? How does one automatically go about converting e-mail attachments into files with known paths on a filesystem so they can be processed via script?

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

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

发布评论

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

评论(1

看轻我的陪伴 2024-08-14 22:15:41

根据我发现的两篇文章,在某些条件下可以在 VBScript 中完成此操作。我不会在这里深入探讨,而是为您提供以下文章:

http://www .example-code.com/vbscript/emailObject_saveAttachments.asp

http://www.devnewsgroups.net/group/microsoft.public.exchange.development/topic32825.aspx

According to two articles I found, this can be done in VBScript uncer certain conditions. Rather than go in depths here, I'll give you the articles:

http://www.example-code.com/vbscript/emailObject_saveAttachments.asp

http://www.devnewsgroups.net/group/microsoft.public.exchange.development/topic32825.aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文