Results 1 to 11 of 11
  1. #1
    3 Star Lounger
    Join Date
    Apr 2002
    Location
    Texas, USA
    Posts
    208
    Thanks
    0
    Thanked 1 Time in 1 Post

    Programatically sending emails via OUtllok XP (XP)

    OL XP has a draconian Object Model guard that pops up an annoying message when another program is trying to send an email programmatically. Isn't there a way to get around this? I know that the 'Redemption' program can do this but I'm fairly certain I remember reading somewhere about how to send emails programatically even with OL XP that will not activate the Object Model Guardian. I believe it had to do with using CDO.

    Thanks in advance

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Programatically sending emails via OUtllok XP (XP)

    Redemption is not a program, it is a COM object that uses Extended MAPI to bypass Outlook security (Extended MAPI is safe because it can't be scripted). It provides the programmer with the capabilities of Outlook, but without the draconian security imposed. Why re-invent the wheel?

  3. #3
    3 Star Lounger
    Join Date
    Apr 2002
    Location
    Texas, USA
    Posts
    208
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Programatically sending emails via OUtllok XP (XP)

    The reason for staying away from 'Redemption' is a cost factor. The need for it would not be just for my company but all the clients that use our product. Have you heard of another approach? Perhaps one using CDO (Collaborative Data Objects)?

    Ed

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Programatically sending emails via OUtllok XP (XP)

    I don't know of a solution using CDO, but I am curious to see if others come up with one.

    (Paying $199.99 for a license for unlimited distribution doesn''t seem very expensive; there is also the free utility ClickYes)

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Programatically sending emails via OUtllok XP (XP)

    Ed, I have been wanting to learn about CDO myself, but have not had time. One place to start would be Slipsticks' CDO page.
    -John ... I float in liquid gardens
    UTC -7DS

  6. #6
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Programatically sending emails via OUtllok XP (XP)

    Ed,
    Sample code for CDO would look like:
    <pre>Set CDOSession = CreateObject("MAPI.Session")
    CDOSession.Logon "Exchange Profile"
    Set oFolder = CDOSession.Outbox
    Set oMessages = oFolder.Messages
    Set oMsg = oMessages.Add
    Set oRcpt = oMsg.Recipients
    oRcpt.Add , "SMTP:me@here.com", CDOTo
    oRcpt.Resolve
    oMsg.Subject = "Test Message"
    oMsg.Text = "This is a test message..."
    oMsg.Send
    CDOSession.Logoff
    </pre>

    A couple of things to note:
    1. Not everyone may have CDO - Office XP does not install it by default.
    2. If you have CDO1.21s it is also susceptible to the Security feature. See <!mskb=295302>Microsoft Knowledge Base Article 295302<!/mskb>
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  7. #7
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Programatically sending emails via OUtllok XP (XP)

    Rory, if you know, where do people using Outlook client find the CDO libraries, help files, etc? Slipstick reads as if it's a major fishing expedition to assemble all the necessary components.
    -John ... I float in liquid gardens
    UTC -7DS

  8. #8
    2 Star Lounger
    Join Date
    Jun 2001
    Location
    Quakers Hill, NSW, Australia
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Programatically sending emails via OUtllok XP (XP)

    Hi, I also had this problem when attempting to send emails from another application. The solution I have used is to make OE my default mail app. I still use OL as my main mail ap. Prob not the ideal solution - but it works!!

    Neville Wenban

  9. #9
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Quedgeley, Gloucester, England
    Posts
    5,333
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Programatically sending emails via OUtllok XP (XP)

    Not sure from where you want to send these messages, but I've used SMTPSEND on Outlook 2002 in a BATch file. There are a whole raft of programs with the same name; mine is fairly ancient, from 7th Wave Software, but it works! The interface is a bit clunky. I'm not sure if BLAT (via Google) has the problem you speak of...
    <font face="Script MT Bold"><font color=blue><big><big>John</big></big></font color=blue></font face=script>

    Ita, esto, quidcumque...

  10. #10
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Programatically sending emails via OUtllok XP (XP)

    John,
    Off the top of my head, I couldn't tell you - I have the Developer version of Office and Exchange Administrator and it was installed by one of those. I would imagine that if you chose a Run All from Hard Disk installation of Office, it should be included. Failing that, you can probably copy the files from the Office CD and register them yourself with regsvr32.
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  11. #11
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Programatically sending emails via OUtllok XP

    CDO was one of the specifed non-default options on my Office XP install disk.
    Gre

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •