【问题标题】:Open eml file in any mail client and take screenshot在任何邮件客户端中打开 eml 文件并截图
【发布时间】:2010-11-01 11:38:55
【问题描述】:

我执行了很多创建电子邮件的测试。我将每条消息存储在单独的 eml 文件中。 (如果需要,我可以更改文件扩展名。)

我想在任何邮件客户端中打开每个文件并截屏,以便以后可以直观地检查电子邮件。

我的想法是我可以使用图像查看应用程序同时查看多个屏幕截图,这样我就可以直观地比较它们(在每次测试运行之后)。

我可以访问 Windows、Mac 和 Linux 机器。如果解决方案是在 Ruby 中,我会更喜欢,但这不是必需的。

我正在搜索网络和这个网站,但到目前为止还没有运气。如果我找到它,我会在答案中发布解决方案。

【问题讨论】:

    标签: ruby screenshot email eml


    【解决方案1】:

    尝试使用Selenium截图

    我没试过,但是有截屏的方法和使用Ruby的方法

    来自documentation

    capture_screenshot(filename)
    
    Captures a PNG screenshot to the specified file.
    
    ‘filename’ is the absolute path to the file to be written, e.g. "c:\blah\screenshot.png" 
    

    您还可以查看Page Glimpse 以了解这些任务。

    您需要找到一种方法来自动化“打开电子邮件/截屏”过程。

    【讨论】:

      【解决方案2】:

      看起来像你can not automate Outlook Express。从命令行启动时,它只接受newsonlymailonly 选项。

      Thunderbird accepts file name 从命令行启动时:

      C:\>"C:\Program Files\Mozilla Thunderbird\thunderbird.exe" mail.eml
      

      这就是我在邮件客户端中打开电子邮件所需要的全部内容。

      snapit.exe 截取屏幕截图并将其保存到文件中。

      这里是为多个 eml 文件截屏的脚本。

      file_names.each do |file_name|
        `start /d "#{thunderbird_folder}" thunderbird.exe #{file_name}`
      
        # if the script does not wait for a second, screen shot will be taken before
        # thunderbird opens
        sleep 1
      
        `snapit.exe`
      end
      

      【讨论】:

        猜你喜欢
        • 2017-09-23
        • 2015-07-16
        • 1970-01-01
        • 2011-07-01
        • 2012-08-29
        • 1970-01-01
        • 2010-12-06
        • 2012-06-10
        • 2021-12-07
        相关资源
        最近更新 更多