Accessing Microsoft Exchange server from Ruby
One place to start would be the Exchange Developer Center, where Microsoft links to downloads of the different SDKs, documentation, etc. Understandably, most of the docs and examples will be using Microsoft's .NET Framework and languages.
If you want to connect with Exchange 2007 or 2010, you'll probably find it easiest to use some form of Exchange Web Services (EWS) which you may be able to connect to using Ruby web services frameworks like SOAP4R, WSO2, etc.
For Exchange 2003 and earlier, you're much more limited; and programming CDO through Ruby's win32ole is not going to be pretty or fun.
Ruby on Rails error using SMTP Microsoft Exchange mail account
Try to send an email via telnet at first. Then check which error message you get. Based on that test you can then build the needed configure.
As discussed in the comments already "plaintext authentication" might be the best option but you can find that out via telnet.
Run Exchange Powershell commands from Linux using Ruby/WinRM
We managed to get it to work. I had to first connect to a 'management' server to initiate the powershell command.
endpoint = 'http://YOURSERVER:5985/wsman'
krb5_realm = 'YOURREALM'
winrm = WinRM::WinRMWebService.new(endpoint, :kerberos, :realm => krb5_realm)
Then I had to modify the exchange command to this:
exch_cmd = "Enable-Mailbox -Identity:'DOMAIN/OU/#{fullname}' -Alias:'#{username}' -Database:'#{MailboxDB}'"
command = "powershell -NonInteractive -WindowStyle Hidden -command \" $username = '#{account}'; $password = ConvertTo-SecureString '#{password}' -asplaintext -force; $UserCredential = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $username,$password; $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri #{server} -Authentication Kerberos -Credential $UserCredential; Invoke-Command -Session $Session {#{exch_cmd}}\""
On the Management and Exchange servers, the service account needs to be in the Remote Management Group. You also need to update the SDDL according to this guide: http://www.sevecek.com/Lists/Posts/Post.aspx?ID=280 Depending on your server config this will be different.
Related Topics
Does Rails Support a Neat Way of Listening to a Udp Socket
Escaping Strings for Ruby Sqlite Insert
Current Password Can't Be Blank When Updating Devise Account
Sql Like Operator in Ruby on Rails
How to Get Records Created at The Current Month
Permission Error When Trying to Install Rails (Osx)
Ruby/Rails Audio Conversion Plugins
Rails 4 - Devise: Getting Actioncontroller::Unknownformat on Signup
Rails on Netbeans: Uncaught Exception: No Such File to Load - Script/Server or Script/Console
Activestorage Issue to Set Record_Type on Active_Storage_Attachments
Watir Changing Mozilla Firefox Preferences
Rails Parameters from Get/Post
What Is The Ruby Equivalent to This Curl Request
Skipping: Touch Associations When Saving an Activerecord Object
Using Multiple Yields to Insert Content
Spawning an Independent Thread or Process in Ruby