Glen Holcomb wrote:
> On Tue, Aug 19, 2008 at 4:28 AM, Peña, Botp <>
> wrote:
>
>> c. checking email fxnality by sending an email. for a sample, see my last
>> post here
>> http://groups.google.com/group/ruby-...7dc5a3b17389ac
>>
>> kind regards -botp
>>
>>
>>
>>
>>
>>
> Small qualifier here. Outlook doesn't always do SMTP, it can be turned
> off
> by the more Evangelical MS Admins.
>
> --
> "Hey brother Christian with your high and mighty errand, Your actions
> speak
> so loud, I can't hear a word you're saying."
>
> -Greg Graffin (Bad Religion)
Thanks for the tips. But yeah, I can't test with SMTP and I already
have another app to do ping tests on all of our servers.
UPDATE-- I got the app to work. I had to end up using Outlook 2003 on
the server. I had to use a plugin (forgot the name but i can get it) to
modify the security settings in '03 so that it doesn't keep asking me to
allow the message to be sent. Part of my problem was that the Outlook
app wanted my password everytime it tried to send an email. I just
checked the box to remember the password.
Also, to anyone programming something that sends an email with outlook
03, you have to use the SyncObjects method after using message.Send or
else it will just put it in your outbox and not send the message. It
doesn't seem to do this in '07. Also, 07 provides the ole method
SendAndRecieve.
Here is a little code to clarify:
require 'win32ole'
@outlook = WIN32OLE.new('Outlook.Application')
@mapi = @outlook.GetNameSpace('MAPI')
message = @outlook.createItem(0)
message.subject('some subject')
...
message.Save
message.Send
@mapi.SyncObjects #OR with '07 @mapi.SendAndRecieve
--
Posted via
http://www.ruby-forum.com/.