DjDeep00 Posted May 8, 2008 Share Posted May 8, 2008 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 More sharing options...
Moderators SmOke_N Posted May 8, 2008 Moderators Share Posted May 8, 2008 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 More sharing options...
DjDeep00 Posted May 8, 2008 Author Share Posted May 8, 2008 Where is the Redemption dll and documentation?http://www.dimastr.com/redemption/ Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted May 8, 2008 Moderators Share Posted May 8, 2008 (edited) http://www.dimastr.com/redemption/Looks like you copied straight from the site, did you register the dll first? Edited May 8, 2008 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 More sharing options...
DjDeep00 Posted May 8, 2008 Author Share Posted May 8, 2008 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 More sharing options...
Moderators SmOke_N Posted May 8, 2008 Moderators Share Posted May 8, 2008 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 More sharing options...
DjDeep00 Posted May 9, 2008 Author Share Posted May 9, 2008 Thanks for trying Smoke_N... Anyone else know much about Redemption.dll or can show me how to force a Send/Recieve in Outlook? Link to comment Share on other sites More sharing options...
DaleHohm Posted May 9, 2008 Share Posted May 9, 2008 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now