From: Tanner Burson Date: 2006-03-29T00:29:19+09:00 Subject: Re: Seeking win32ole CDO/Mapi help ------=_Part_23087_16801245.1143559740249 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 3/28/06, Keith Sader wrote: > > I'm trying to read a remote mail store using the CDO OLE interface > using the ProfileInfo interface as described here: > http://www.vbip.com/books/1861002068/chapter_2068_04.asp, but I've run > into the wall of my own ignorance. > > Here's what I have so far: > > # Ruby code > require 'win32ole' > > mapiSession =3D WIN32OLE::new('MAPI.Session') > > #load MAPI constants > class MapiConst > end > WIN32OLE.const_load(mapiSession, MapiConst) > > exchangeServer =3D 'myServer > mailbox =3D 'mail@foo.com' > logonParam =3D "ProfileInfo:=3D"+ exchangeServer + "\r" + mailbox > mapiSession.Logon(logonParam) > # the rest of the code... > > However the Logon method throws the following set of exceptions. > > First I get a pop-up dialog stating that the Profile Name contains > invalid characters. > > From the above link: "The ProfileInfo is a string that consists of > three parts. The first is the name of the Exchange Server. The second > is always a linefeed character." > > I think part of my problem is I'm not getting the correct character in > as the linefeed. Can someone validate that? Maybe I'm missing and > easy Ruby trick to add a linefeed to a string? I believe linefeed is \n and \r is carriage return. -- =3D=3D=3DTanner Burson=3D=3D=3D tanner.burson@gmail.com http://tannerburson.com <---Might even work one day... ------=_Part_23087_16801245.1143559740249--