Jump to content

Fake Emailer Function


Recommended Posts

Ok, here is my Fake email sender function...

Fake Mailer Current Version: 2.0

Requirements: IE.au3 v2.0 , AutoIt3 Beta with COM support (3.1.1.63 or higher)

Parameters:

1. Send Email To...

2. Fake From Email Address

3. Fake Sender's Name

4. Subject Of Email

5. Message To Send

6. Show status message boxes 1 = Show ; 0 = Silent

Returns:

1 = Success

0 = Failure

Example:

fake_email("me@hotmail.com", "billgates@microsoft.com", "Bill Gates", "Hello" , "Hey! how are you?", 0)

#include<IE.au3>



func fake_email($to, $from, $from_name, $subject, $message, $silent)
;==============================================
;               For Use with IE.au3 version 2.0 !
;            This code is (C) 2006
;==============================================

$i = 1
$oIE = _IECreate ("http://www.fake-mailer.com/fmlite/", 0, 0)
; get pointers to the login form and username and password fields
$o_form = _IEFormGetCollection ($oIE, 0)
$o_name = _IEFormElementGetObjByName ($o_form, "name")
$o_to = _IEFormElementGetObjByName ($o_form, "to")
$o_subject = _IEFormElementGetObjByName ($o_form, "subject")
$o_from = _IEFormElementGetObjByName ($o_form, "from")
$o_message = _IEFormElementGetObjByName ($o_form, "message")

If @error = 1 Then 
    if $silent = 1 then MsgBox(0, "Error","No connection")
    return 0
EndIf

; Set field values and submit the form
_IEFormElementSetValue ($o_name, $from_name)
_IEFormElementSetValue ($o_to, $to)
_IEFormElementSetValue ($o_subject, $subject)
_IEFormElementSetValue ($o_from, $from)
_IEFormElementSetValue ($o_message, $message)
_IEFormSubmit ($o_form)

While $i = 1
    If WinExists("Email was sent - Microsoft Internet Explorer") Then
        $i = 0
        ExitLoop
    EndIf
    If WinExists("http://www.fake-mailer.com/fmlite/sendMail.php") Then
        WinKill("http://www.fake-mailer.com/fmlite/sendMail.php")
        If $silent = 1 Then MsgBox(16, "Email Sender", "Error Sending Email")
        $i = 0
        Exit
    EndIf
WEnd
If $silent = 1 Then MsgBox(64, "Email Sender", "Email Was Sent")
WinKill("Email was sent - Microsoft Internet Explorer")
endfunc

Any ideas/Comments/Fixes/Improvements?

Edited by spyrorocks
Link to comment
Share on other sites

NICE! This is exactly what I am looking for! I need an Emailer for one of my programme but InetMail won't work. You're so great! I have only a little problem with ie.au3.. :)

This:

D:\autoit-3\Include\IE.au3(516,54) : ERROR: Opt() [built-in] called with wrong number of args.
        Local $iWinTitleMatchMode = Opt("WinTitleMatchMode")
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit-3\Include\IE.au3(2372,29) : ERROR: SetError() [built-in] called with wrong number of args.
        SetError(@error, @extended)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit-3\Include\IE.au3(2435,53) : ERROR: SetError() [built-in] called with wrong number of args.
    If @error Then Return SetError(@error, @extended, 0)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit-3\Include\IE.au3(2448,39) : ERROR: SetError() [built-in] called with wrong number of args.
        Return SetError(@error, @extended, 0)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit-3\Include\IE.au3(386,55) : ERROR: HWnd(): undefined function.
            If $f_takeFocus Then WinActivate(HWnd($oResult.HWND)
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit-3\Include\IE.au3(600,27) : ERROR: ObjName(): undefined function.
        Switch ObjName($o_object)
        ~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit-3\Include\IE.au3(2193,128) : ERROR: Execute(): undefined function.
                $aVcard[1][$i] = Execute('$o_object.document.parentwindow.top.navigator.userProfile.getAttribute("' & $aVcard[0][$i] & '")')
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit-3\Include\IE.au3(2402,54) : ERROR: DllStructCreate(): undefined function.
    $typUUID = DllStructCreate("int;short;short;byte[8]")
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit-3\Include\IE.au3(2403,42) : ERROR: DllStructSetData(): undefined function.
    DllStructSetData($typUUID, 1, 0x626FC520)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
D:\autoit-3\Include\IE.au3(2415,108) : ERROR: DllStructGetPtr(): undefined function.
    $aRet = DllCall("oleacc.dll", "int", "ObjectFromLresult", "int", $lResult, "ptr", DllStructGetPtr($typUUID)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


~~~~~~~~~~~^
D:\autoit-3\Examples\sendemail.au3 - 10 error(s), 0 warning(s)
!>AU3Check ended.rc:2
>Running:(3.1.1.0):D:\autoit-3\autoit3.exe "D:\autoit-3\Examples\sendemail.au3" 
D:\autoit-3\Include\IE.au3 (363) : ==> "Case" statement with no matching "Select" statement.: 
Case "0" 
->AutoIT3.exe ended.rc:1
>Exit code: 1   Time: 13.647

Help me someone! I really need this Emailer.

Thanks.

Edited by Joke758

[u]My Programs:[/u]Word Search Creator - Make your own Word SearchShortHand - Hide a secret message in a jpg fileHex Editor - Edit your Binary fileIncrease file size - Increase the size of any filesArt Generator - A program that generate random picture[u]My Functions:[/u]16-Bits Hash - My Hash function similar to MD5Probabilities - My probabilities function (factorial, permuation, combination)_GetDate() - Convert a date to a day of the week_Base(), _Dec() - Convert a number in any base (bin, oct, hex, dec). Create your own!

Link to comment
Share on other sites

Thank you! :)

EDIT: Your program is GREAT Thank you so much! Now I can finish my program. Thanks again!

Edited by Joke758

[u]My Programs:[/u]Word Search Creator - Make your own Word SearchShortHand - Hide a secret message in a jpg fileHex Editor - Edit your Binary fileIncrease file size - Increase the size of any filesArt Generator - A program that generate random picture[u]My Functions:[/u]16-Bits Hash - My Hash function similar to MD5Probabilities - My probabilities function (factorial, permuation, combination)_GetDate() - Convert a date to a day of the week_Base(), _Dec() - Convert a number in any base (bin, oct, hex, dec). Create your own!

Link to comment
Share on other sites

Wow that is really great :)

--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Link to comment
Share on other sites

  • 1 month later...

I think Fake mailer update something and now your function doesnt work :D Can you update it?

[u]My Programs:[/u]Word Search Creator - Make your own Word SearchShortHand - Hide a secret message in a jpg fileHex Editor - Edit your Binary fileIncrease file size - Increase the size of any filesArt Generator - A program that generate random picture[u]My Functions:[/u]16-Bits Hash - My Hash function similar to MD5Probabilities - My probabilities function (factorial, permuation, combination)_GetDate() - Convert a date to a day of the week_Base(), _Dec() - Convert a number in any base (bin, oct, hex, dec). Create your own!

Link to comment
Share on other sites

Have the integrity to honetly say who you are in your eMails. Anything else is phishing or spamming!

It's things like this that give the rest of the AutoIt community a bad name. :D

Walkabout

what are you complaining about , by the looks of your signature you made a emailer that allows you to choose the email of the sender as well, your basicaly saying that spyro is a homosexual and that you arent when secretly you are.... anyways looks nice , sounds like fun :D evne though there are some other things that dont rely on websites but eh gets you to the same place no matter which path u take so good job

it would make the script long but instead of having people include IE.au3 and all maybe get the functions out of IE and put them in your UDF that way they only need to include 1 file, and i know IE.au3 uses some of its functions in one function so it could be somewhat difficult but im sure not to much since u only use 5 commands

Edited by thatsgreat2345
Link to comment
Share on other sites

  • 3 weeks later...

1. I installed Autoit.

2. I installed Autoit Beta.

2a. I installed Scite.

3. I downloaded IE.au3 and IE_V1Compatibility.au3 to C:\Program Files\AutoIt3\beta\Include

4. I created above email file called it: email.au3 placed file in same folder as files in step 3.

5. Opened in Scite, pressed F5...these errors: Any idea why? As far as I can tell i followed the instructions.

C:\Program Files\AutoIt3\beta\Include\IE.au3(388,41) : ERROR: SetError() [built-in] called with wrong number of args.

SetError($_IEStatus_InvalidDataType, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\beta\Include\IE.au3(394,43) : ERROR: SetError() [built-in] called with wrong number of args.

SetError($_IEStatus_InvalidObjectType, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\beta\Include\IE.au3(452,54) : ERROR: Opt() [built-in] called with wrong number of args.

Local $iWinTitleMatchMode = Opt("WinTitleMatchMode")

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\beta\Include\IE.au3(462,34) : ERROR: SetError() [built-in] called with wrong number of args.

SetError($_IEStatus_NoMatch, 1)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

C:\Program Files\AutoIt3\beta\Include\IE.au3(500,41) : ERROR: SetError() [built-in] called with wrong number of args.

SetError($_IEStatus_InvalidValue, 2)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^

Link to comment
Share on other sites

  • Developers

5. Opened in Scite, pressed F5...these errors: Any idea why? As far as I can tell i followed the instructions.

Alt-F5 to run it with Beta?

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

If Slow( Daniel_W ) = 1 Then
     PostEdit( "JdeB beat me!" )
EndIf

Use Betarun (alt+f5) :D

Edited by Daniel W.

--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Link to comment
Share on other sites

Here's a GUI for it. Sorry I can't finish it, SKEWL!

EDIT:forgot name:

edit:Fixed something

#include <GuiConstants.au3>
#include <fake_email.au3>

GuiCreate("Email Rape", 306, 390,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Lbl_To = GuiCtrlCreateLabel("To:", 10, 20, 20, 20)
$Lbl_From = GuiCtrlCreateLabel("From:", 10, 50, 30, 20)
$Lbl_Name = GuiCtrlCreateLabel("Name:", 10, 80, 30, 20)
$Lbl_Sender = GuiCtrlCreateLabel("Sender:", 10, 110, 40, 20)
$Lbl_Subject = GuiCtrlCreateLabel("Subject:", 10, 140, 40, 20)
$Lbl_Message = GuiCtrlCreateLabel("Message:", 10, 170, 50, 20)
$Lbl_SendN = GuiCtrlCreateLabel("Times To Send:", 10, 370, 80, 20)
$In_To = GuiCtrlCreateInput("", 30, 20, 270, 20)
$In_From = GuiCtrlCreateInput("", 50, 50, 250, 20)
$In_Name = GuiCtrlCreateInput("", 50, 80, 250, 20)
$In_Sender = GuiCtrlCreateInput("", 50, 110, 250, 20)
$In_Subject = GuiCtrlCreateInput("", 60, 140, 240, 20)
$In_Msg = GuiCtrlCreateEdit("", 10, 190, 290, 180)
$In_SendN = GuiCtrlCreateInput("", 100, 370, 70, 20)
$Btn_Send = GuiCtrlCreateButton("Send", 200, 370, 100, 20)
$To = GUICtrlRead($In_To)
$From = GUICtrlRead($In_From)
$Sender = GUICtrlRead($In_Sender)
$Subject = GUICtrlRead($In_Subject)
$Message = GUICtrlRead($In_MSg)
$SendN = GUICtrlRead($In_SendN)
$Name = GUICtrlRead($In_Name)

EDIT: I tried sending a test message to my email, without any GUI or anything. Doesn't work for me. I'll make a cmd prompt version after skewl.

Edited by gamepin126
Link to comment
Share on other sites

#include <GuiConstants.au3>
#include <fake_email.au3>

GuiCreate("Email Rape", 306, 390,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Lbl_To = GuiCtrlCreateLabel("To:", 10, 20, 20, 20)
$Lbl_From = GuiCtrlCreateLabel("From:", 10, 50, 30, 20)
$Lbl_Name = GuiCtrlCreateLabel("Name:", 10, 80, 30, 20)
$Lbl_Sender = GuiCtrlCreateLabel("Sender:", 10, 110, 40, 20)
$Lbl_Subject = GuiCtrlCreateLabel("Subject:", 10, 140, 40, 20)
$Lbl_Message = GuiCtrlCreateLabel("Message:", 10, 170, 50, 20)
$Lbl_SendN = GuiCtrlCreateLabel("Times To Send:", 10, 370, 80, 20)
$In_To = GuiCtrlCreateInput("", 30, 20, 270, 20)
$In_From = GuiCtrlCreateInput("", 50, 50, 250, 20)
$In_Name = GuiCtrlCreateInput("", 50, 80, 250, 20)
$In_Sender = GuiCtrlCreateInput("", 50, 110, 250, 20)
$In_Subject = GuiCtrlCreateInput("", 60, 140, 240, 20)
$In_Msg = GuiCtrlCreateEdit("", 10, 190, 290, 180)
$In_SendN = GuiCtrlCreateInput("", 100, 370, 70, 20)
$Btn_Send = GuiCtrlCreateButton("Send", 200, 370, 100, 20)

GUISetState()

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Btn_Send
            $To = GUICtrlRead($In_To)
            $From = GUICtrlRead($In_From)
            $Sender = GUICtrlRead($In_Sender)
            $Subject = GUICtrlRead($In_Subject)
            $Message = GUICtrlRead($In_MSg)
            $SendN = GUICtrlRead($In_SendN)
            $Name = GUICtrlRead($In_Name)
            Do
                fake_email( $to , $from , $Sender, $subject, $message, 0 )
                $SendN -= 1
            Until $SendN = 0
            MsgBox( 64, "" , GUICtrlRead( $In_SendN ) & " emails were send!" )
    EndSwitch
WEnd

Maybe this ....

--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Link to comment
Share on other sites

Sender was unneccessary, whoops.

I can't even get the script to finish, it just dies as soon as it hits fake_email. Tried testing with a messagebox, the GUI works correctly, and the loop. fake_email just doesn't.

#include <GuiConstants.au3>
#include <fake_email.au3>

GuiCreate("Email Rape", 306, 350,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Lbl_To = GuiCtrlCreateLabel("To:", 10, 10, 20, 20)
$Lbl_From = GuiCtrlCreateLabel("From:", 10, 40, 30, 20)
$Lbl_Name = GuiCtrlCreateLabel("Name:", 10, 70, 30, 20)
$Lbl_Subject = GuiCtrlCreateLabel("Subject:", 10, 100, 40, 20)
$Lbl_Message = GuiCtrlCreateLabel("Message:", 10, 130, 50, 20)
$Lbl_SendN = GuiCtrlCreateLabel("Times To Send:", 10, 330, 80, 20)
$In_To = GuiCtrlCreateInput("", 30, 10, 270, 20)
$In_From = GuiCtrlCreateInput("", 50, 40, 250, 20)
$In_Name = GuiCtrlCreateInput("", 50, 70, 250, 20)
$In_Subject = GuiCtrlCreateInput("", 60, 100, 240, 20)
$In_Msg = GuiCtrlCreateEdit("", 10, 150, 290, 180)
$In_SendN = GuiCtrlCreateInput("", 100, 330, 70, 20)
$Btn_Send = GuiCtrlCreateButton("Send", 200, 330, 100, 20)

GUISetState()

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Btn_Send
            $To = GUICtrlRead($In_To)
            $From = GUICtrlRead($In_From)
            $Subject = GUICtrlRead($In_Subject)
            $Message = GUICtrlRead($In_MSg)
            $SendN = GUICtrlRead($In_SendN)
            $Name = GUICtrlRead($In_Name)
            GUICtrlSetData($In_To, $To)
            GUICtrlSetData($In_From, $From)
            GUICtrlSetData($In_From, $Subject)
            GUICtrlSetData($In_SendN, $SendN)
            GUICtrlSetData($In_Msg, $Message)
            GUICtrlSetData($In_Name, $Name)
            Do                  
                fake_email( $to , $from , $Name, $subject, $message, 0 )
                $SendN -= 1
            Until $SendN = 0
            MsgBox(0, "Results", "To: " & $To  & @CRLF & "From: " & $From & @CRLF & "Name: " & $Name  & @CRLF & "Subject: " & $Subject  & @CRLF & "Times to be sent: " & $SendN  & @CRLF & "Message: " & @CRLF &  $Message) 
    EndSwitch
WEnd
Edited by gamepin126
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...