Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8583221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:28:56+00:00 2026-06-11T21:28:56+00:00

My work requires me to automate e-mail generation for certain tests. I’ve been looking

  • 0

My work requires me to automate e-mail generation for certain tests. I’ve been looking around but havent been able to find a reasonable solution that can be implemented quickly. It needs to be in outlook and not some other mail server as we have some strange authentication rules in place, and we need the option of saving drafts instead of just sending the message.

Apparently win32ole can do this, but I can’t find any reasonably simple examples.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:28:57+00:00Added an answer on June 11, 2026 at 9:28 pm

    Assuming that the Outlook credentials are stored and you are set to autologin to Outlook, WIN32OLE does the trick quite nicely:

    require 'win32ole'
    outlook = WIN32OLE.new('Outlook.Application')
    message = outlook.CreateItem(0)
    message.Subject = "Hey look a subject!"
    message.Body = "Yes this is dog"
    message.Recipients.Add 'dog@dog.com'
    message.Recipients.Add 'cat@dog.com'
    message.Attachments.Add('C:\Path\To\File.txt')
    #Want to save as a draft?
    message.Save
    #Want to send instead?
    message.Send
    

    This is in fact quite well documented in “Automating Outlook with Ruby: Saving Mail Messages To Files“, as is automating the rest of windows with Ruby.

    You may have an authorization issue, which, if it appears, can be solved using “Advanced Security for Outlook“.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a PowerShell script to automate a process at work. This process requires
My work requires that I perform a mathematical simulation whose parameters come from a
My work requires me to develop for Eclipse 3.4 (ganymede). I would like to
I am required to work on a php project that requires the database to
I installed liquibase in my ubuntu to work with sqlite, which requires sqlitejdbc driver
I was investigating using the Rake build tool to automate running unit tests. I
We're looking at record and playback type test tools to automate some of our
I am required to automate software tests for my job and I currently use
I'm writing a client/server application that requires the server needs to be able to
I would like to automate the results creation process when I apply certain modeling

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.