BinaryBrother Posted January 29, 2008 Posted January 29, 2008 (edited) I'm setting up a quick AutoIt crash indicator to email me when AutoIt crashes... But the below code.... expandcollapse popup#Include<file.au3> $s_SmtpServer = "smtp.gmail.com" $s_FromName = "Binarybrotherauto" $s_FromAddress = "**" $s_ToAddress = "**" $s_Subject = "AutoIt Crashed" $as_Body = "AutoIt seems to have crashed." $s_AttachFiles = "" $s_CcAddress = "" $s_BccAddress = "" $s_Username = "**" $s_Password = "*********" $IPPort = 465 $ssl = 0 Global $oMyRet[2] Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc") $rc = _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, $s_AttachFiles, $s_CcAddress, $s_BccAddress, $s_Username, $s_Password, $IPPort, $ssl) If @error Then MsgBox(0, "Error sending message", "Error code:" & @error & " Rc:" & $rc) EndIf ; Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Username = "", $s_Password = "",$IPPort=25, $ssl=0) $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>' $objEmail.To = $s_ToAddress Local $i_Error = 0 Local $i_Error_desciption = "" If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress $objEmail.Subject = $s_Subject If StringInStr($as_Body,"<") and StringInStr($as_Body,">") Then $objEmail.HTMLBody = $as_Body Else $objEmail.Textbody = $as_Body & @CRLF EndIf If $s_AttachFiles <> "" Then Local $S_Files2Attach = StringSplit($s_AttachFiles, ";") For $x = 1 To $S_Files2Attach[0] $S_Files2Attach[$x] = _PathFull ($S_Files2Attach[$x]) If FileExists($S_Files2Attach[$x]) Then $objEmail.AddAttachment ($S_Files2Attach[$x]) Else $i_Error_desciption = $i_Error_desciption & @lf & 'File not found to attach: ' & $S_Files2Attach[$x] SetError(1) return 0 EndIf Next EndIf $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort ;Authenticated SMTP If $s_Username <> "" Then $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password EndIf If $Ssl Then $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True EndIf ;Update settings $objEmail.Configuration.Fields.Update ; Sent the Message $objEmail.Send if @error then SetError(2) return $oMyRet[1] EndIf EndFunc;==>_INetSmtpMailCom ; ; ; Com Error Handler Func MyErrFunc() $HexNumber = Hex($oMyError.number, 8) $oMyRet[0] = $HexNumber $oMyRet[1] = StringStripWS($oMyError.description,3) ConsoleWrite("### COM Error ! Number: " & $HexNumber & " ScriptLine: " & $oMyError.scriptline & " Description:" & $oMyRet[1] & @LF) SetError(1); something to check for when this function returns Return EndFunc;==>MyErrFunc Give me these... >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Documents and Settings\Administrator\My Documents\send mail.au3" ### COM Error ! Number: 800401F3 ScriptLine: 27 Description: ### COM Error ! Number: 000000A9 ScriptLine: 28 Description: ### COM Error ! Number: 000000A9 ScriptLine: 29 Description: ### COM Error ! Number: 000000A9 ScriptLine: 34 Description: ### COM Error ! Number: 000000A9 ScriptLine: 38 Description: ### COM Error ! Number: 000000A9 ScriptLine: 53 Description: ### COM Error ! Number: 000000A9 ScriptLine: 54 Description: ### COM Error ! Number: 000000A9 ScriptLine: 55 Description: ### COM Error ! Number: 000000A9 ScriptLine: 58 Description: ### COM Error ! Number: 000000A9 ScriptLine: 59 Description: ### COM Error ! Number: 000000A9 ScriptLine: 60 Description: ### COM Error ! Number: 000000A9 ScriptLine: 66 Description: ### COM Error ! Number: 000000A9 ScriptLine: 68 Description: >Exit code: 0 Time: 3.571 A message box also appears with | Error Sending Message | error code:2 rc: Thanks in advance for your assistance. Edited May 11, 2010 by BinaryBrother SIGNATURE_0X800007D NOT FOUND
BinaryBrother Posted January 30, 2008 Author Posted January 30, 2008 Any advise at all.... SIGNATURE_0X800007D NOT FOUND
Diver2006 Posted January 30, 2008 Posted January 30, 2008 hi,is the port 465 the correct? Attempts times port 25$s_SmtpServer = "smtp.gmail.com" $s_FromName = "Binarybrotherauto" $s_FromAddress = "binarybrotherauto@gmail.com"$s_ToAddress = "binarybrother@gmail.com" $s_Subject = "AutoIt Crashed" $as_Body = "AutoIt seems to have crashed." $s_AttachFiles = "" $s_CcAddress = "" $s_BccAddress = "" $s_Username = "binarybrotherauto@gmail.com" $s_Password = "*********" $IPPort = 465 $ssl = 0
BrettF Posted January 30, 2008 Posted January 30, 2008 hi,is the port 465 the correct? Attempts times port 25Is correct. Gmail is different Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Developers Jos Posted January 30, 2008 Developers Posted January 30, 2008 (edited) Is correct. Gmail is different I assume that SSL should be 1 when using port 465 .. but I think you need to check your CDO setup. Just search on google for: CDO 800401F3 Edited January 30, 2008 by Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
BinaryBrother Posted January 30, 2008 Author Posted January 30, 2008 I assume that SSL should be 1 when using port 465 .. but I think you need to check your CDO setup. Just search on google for: CDO 800401F3 By what I've gathered CDO is some sort of replacement mailing service for 'CDONTS' in a server machine (Windows Server), serving these pages via ASP or similar. Most suggest reformatting the code, or upgrading from 'CDONTS' to 'CDO'. I have no clue about ASP-etc. Maybe I mis-interpreted you... SIGNATURE_0X800007D NOT FOUND
Developers Jos Posted January 30, 2008 Developers Posted January 30, 2008 By what I've gathered CDO is some sort of replacement mailing service for 'CDONTS' in a server machine (Windows Server), serving these pages via ASP or similar. Most suggest reformatting the code, or upgrading from 'CDONTS' to 'CDO'. I have no clue about ASP-etc. Maybe I mis-interpreted you...As far as I know it should be available on any standard XP machine with IE5 or better.. (didn't verify this to make sure) SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
Shyju Posted February 21, 2011 Posted February 21, 2011 As far as I know it should be available on any standard XP machine with IE5 or better.. (didn't verify this to make sure)Yes . The scripts only works with WinXP. I have tried in Windows 7 and got the below Error Msg. Is there any alternative for this script to send email.### COM Error ! Number: 80020009 ScriptLine: 44 Description:The requested body part was not found in this message.### COM Error ! Number: 80020009 ScriptLine: 45 Description:The requested body part was not found in this message.### COM Error ! Number: 80020009 ScriptLine: 50 Description:The requested body part was not found in this message.
Developers Jos Posted February 21, 2011 Developers Posted February 21, 2011 Yes . The scripts only works with WinXP. I have tried in Windows 7 and got the below Error Msg. Is there any alternative for this script to send email.### COM Error ! Number: 80020009 ScriptLine: 44 Description:The requested body part was not found in this message.### COM Error ! Number: 80020009 ScriptLine: 45 Description:The requested body part was not found in this message.### COM Error ! Number: 80020009 ScriptLine: 50 Description:The requested body part was not found in this message.Works fine for me on OS:WIN_7/ CPU:X64 OS:X64.Show the script without account info that I can have a look at and test with on my Win7 box. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
DeltaRocked Posted August 30, 2013 Posted August 30, 2013 (edited) Hi , I have tried doing as suggested in the above transcripts and from other threads in this forum ie. compile the exe for x64, however I am getting the following error: 2013-08-30 12:23:14 : ### COM Error ! Number: 800401F3 ScriptLine: -1 Description: 2013-08-30 12:23:14 : ### COM Error ! Number: 000000A9 ScriptLine: -1 Description: OS: 64Bit Windows Server 2008 Std. with Exchange server. CDO version :CDOEX While using the 32Bit compiled exe I am getting 8002801D Any ideas? Edited August 30, 2013 by DeltaRocked
water Posted August 30, 2013 Posted August 30, 2013 HRESULT: 0x800401F3 (CO_E_CLASSSTRING) means that a required component isn't installed. CDO is no longer supported by MS. I will search for some MS links describing the problem ... My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
DeltaRocked Posted August 30, 2013 Posted August 30, 2013 Hi Water, Thanks for the input. upon further investigation, MS2008 server with MS Exchange requires MAPI/CDO libraries / MS Outlook to be installed. I have asked my support staff to do the needful at the client's place and will revert back in next 48 hours. Hopefully this should resolve the issue. The Link: http://theessentialexchange.com/blogs/michael/archive/2008/06/05/mapi-cdo-for-windows-server-2008-and-windows-vista.aspx However the MAPI/CDO download link mentioned in the article is broken. Regards Deltarocked.
water Posted August 30, 2013 Posted August 30, 2013 Does this link work? My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
DeltaRocked Posted August 31, 2013 Posted August 31, 2013 Hi water, will give this a try on a fresh server. cant take chances with live production . will revert back. regards
water Posted August 31, 2013 Posted August 31, 2013 If you can't install CDO on the server I would suggest to use Blat to send the mails. It's a standalone program that even can be packed (FileInstall) with the AutoIt script. My UDFs and Tutorials: Spoiler UDFs: Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
DeltaRocked Posted August 31, 2013 Posted August 31, 2013 Hi water, blat is the last option, however for testing purpose I cannot play around with the live prod. hence first the test server and then on to prod server. whatever be the outcome will revert back. Regards
rudi Posted September 4, 2013 Posted September 4, 2013 Hi. IMHO blat is the *BEST* option. Simply works and one single file install doesn't harm Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE!
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