Jump to content

Recommended Posts

Posted

No idea how too use the autoit code here so I'll just copy paste it.

(The smtp thing is taken from Jose or what his name was, thanks!)

I DO know my code sucks, but I suck in au3 =P. I just want too try too finish this script. However, I cannot get this part too work:

Select

Case $msg = $Sendmail

GuictrlRead ($s_SmtpServer&$s_FromName&$s_FromAddress&$s_ToAddress&$s_Subject&$as_Body&$s_AttachFiles&$s_CcAddress&$s_BccAddress&$s_Username&$s_Password&$IPPort&$ssl)

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)

exit

EndIf

That's the sendmail script. I have included the functions!

These are the variables.

$s_SmtpServer = GUICtrlCreateInput ("Type in smtp server here", 5, 5, 150, 20);Input for the Smtp server

$s_FromName = GUICtrlCreateInput ("Type in the name it's from", 155, 5, 150, 20);Input for the Smtp server

$s_FromAddress = GUICtrlCreateInput ("Type in the email it's from", 310, 5, 150, 20);Input for the Smtp server

$s_ToAddress = GUICtrlCreateInput ("Type in the email you're sending too", 5, 30, 400, 20);Input for the Smtp server

$s_Subject = GUICtrlCreateInput ("Type in the subject of the email", 5, 50, 400, 20);Input for the Smtp server

$as_Body = GUICtrlCreateInput ("Type in the message here", 5, 100, 875, 410);Input for the Smtp server

$s_AttachFiles = GUICtrlCreateInput ("Browse too the attachment", 5, 75, 400, 20);Input for the Smtp server

$s_CcAddress = GUICtrlCreateInput ("Type in the CC addresses", 410, 30, 350, 20);Input for the Smtp server

$s_BccAddress = GUICtrlCreateInput ("Type in the BCC addresses", 410, 50, 350, 20);

$s_Username = GUICtrlCreateInput ("Type in email login and password here-->", 465, 5, 200, 20)

$s_Password = GUICtrlCreateInput ("", 670, 5, 150, 20, $ES_PASSWORD)

$IPPort = GUICtrlCreateInput ("PORT?", 765, 30, 100, 20)

$ssl = GUICtrlCreateInput ("SSL?", 765, 50, 100, 20)

Don't mind the comments.

Now when I fill in the forms and hit send I get an error.

Errorcode:1 Rc:0

I think it has something too do with parameters but don't really know what it means.

So, can anyone help me out here?

Thanks.

(If you need more code pasted just tell me. I do think this is all you need though, but what do I know?t.t)

Posted

GUICtrlRead is made to read "1" control at at time

this will not work

GuictrlRead ($s_SmtpServer&$s_FromName&$s_FromAddress&$s_ToAddress&$s_Subject&$as_Body&$s_AttachFiles&$s_CcAddress&$s_BccAddress&$s_Username&$s_Password&$IPPort&$ssl)

8)

NEWHeader1.png

Posted

I still get the same error with:

GuictrlRead ($s_SmtpServer)

GuictrlRead ($s_FromName)

GuictrlRead ($s_FromAddress)

GuictrlRead ($s_ToAddress)

GuictrlRead ($s_Subject)

GuictrlRead ($as_Body)

GuictrlRead ($s_AttachFiles)

GuictrlRead ($s_CcAddress)

GuictrlRead ($s_BccAddress)

GuictrlRead ($s_Username)

GuictrlRead ($s_Password)

GuictrlRead ($IPPort)

GuictrlRead ($ssl)

t_t. Thanks for helping though.

Posted

This is from another post

Func Apply()
    $s_SmtpServer = GUICtrlRead($Input12)
    $s_FromName = GUICtrlRead($Input52)
    $s_FromAddress = GUICtrlRead($Input62)
    $s_Username = GUICtrlRead($Input32)
    $s_Password = GUICtrlRead($Input42)
    $IPPort = GUICtrlRead($Input22)
    If GUICtrlRead($Checkbox1) = $GUI_CHECKED Then
        $ssl = "1"
    Else
        $ssl = "0"
    EndIf
EndFunc   ;==>Apply

http://www.autoitscript.com/forum/index.ph...st&p=438090

8)

NEWHeader1.png

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...