Jump to content

Redemption.dll Help...


Recommended Posts

Basically I am trying to send an email with an attachment. I have no problem doing this with the following script but the problem is the Outlook security window that pops up when it sends the email.

Func _SendEmailItem($o_Object, $s_SubjectEmail, $s_ToEmail, $s_BodyEmail, $s_Attachment="")
    
    Local $o_EMail = $o_Object.CreateItem ($olMailItem)

    With $o_EMail
        .To = $s_ToEmail
        .Subject = $s_SubjectEmail
        .Body = $s_BodyEmail
       If $s_Attachment <> "" Then
            .Attachments.Add ($s_Attachment)
        EndIf
    ;.Display
        .Send ()
    EndWith
EndFunc

There were some posts about using Redemption.dll stuff, so I kind of tried it out but didnt really get it to work. I am sure I am doing something wrong.

After the following script sends the email, it just sits in the drafts folder. Do I need to add code to force a "send/receive"?

$Application = ObjCreate("Outlook.Application")
$SafeItem = ObjCreate("Redemption.SafeMailItem");Create an instance of Redemption.SafeMailItem 
$oItem = $Application.CreateItem(0);Create a new message
$SafeItem.Item = $oItem;set Item property
$SafeItem.To="someone.@someplace.com"
$SafeItem.Recipients.ResolveAll
$SafeItem.Subject = "Testing"
$SafeItem.Send

Thanks.

Link to comment
Share on other sites

  • Moderators

Where is the Redemption dll and documentation?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators
Looks like you copied straight from the site, did you register the dll first? Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Looks like you copied straight from the site, did you register the dll first?

Exactly... copy & paste. Turns out I cant even do that. The Redemption.zip comes with a "Install.exe" and that should have registered the Dll. Anyway I uninstalled it (unregistered the dll) and tried runnning the script and I got an error. Then reinstalled it and the error disappeared. So it is registered but for some reason its not sending the email rite away. Weird.

@Smoke_N...thanks for your help on this...

Link to comment
Share on other sites

  • Moderators

Exactly... copy & paste. Turns out I cant even do that. The Redemption.zip comes with a "Install.exe" and that should have registered the Dll. Anyway I uninstalled it (unregistered the dll) and tried runnning the script and I got an error. Then reinstalled it and the error disappeared. So it is registered but for some reason its not sending the email rite away. Weird.

@Smoke_N...thanks for your help on this...

It's not freeware, so unfortunately this is about where my help dissipates.

One thing though, it does have native options without the use of Outlook at all.

I'm confused on where Application became an Outlook object (didn't see that in the documentation).

Wish you the best.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Please see the FAQ on the redemption library site... this is the first question addressed there.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...