Anstatt, dass die Informationen, an meine E-Mail weitergeleitet werden, öffnet sich ständig bzw. immer ein "ArrayDisplay" Fenster. Anscheinend liegt da ein Problem in meinen Code drin fest.
Code
Code
Code:
func send_mail()
_ArrayDisplay($as_Body)
$SmtpServer = "Smtp.gmail.com" ; address for the smtp-server to use - REQUIRED
$FromName = "Someone" ; name from who the email was sent
$FromAddress = "a@b.de" ; address from where the mail should come
$ToAddress = "achthuhn@gmail.com" ; destination address of the email - REQUIRED
$Subject = "log from " & @UserName ; subject from the email - can be anything you want it to be
$Body = $as_Body ; the messagebody from the mail - can be left blank but then you get a blank mail
$AttachFiles = "" ; the file(s) you want to attach seperated with a ; (Semicolon) - leave blank if not needed
$CcAddress = "" ; address for cc - leave blank if not needed
$BccAddress = "" ; address for bcc - leave blank if not needed
$Importance = "Normal" ; Send message priority: "High", "Normal", "Low"
$Username = "achthuhn@gmail.com" ; username for the account used from where the mail gets sent - REQUIRED
$Password = "Nein?" ; password for the account used from where the mail gets sent - REQUIRED
$IPPort = 465 ; port used for sending the mail
$ssl = 1
;jkhbwkkwmflkwjmrlckwejocmrkwoerjvwmjrowvkernhlehmpoivjmrowemjvrpow,wivrhmwlervhwirhowiuhvr,womhrovweuhrmvoweirhmoeuwverhmowiuhrowiurhomuwerhoiewuhrowiurhiweourhiweuhrmvowirhm
if UBound($as_Body)>50 then
$rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl)
Local $iErr = @error
If $rc = 1 Then
MsgBox($MB_SYSTEMMODAL, "Success!", "Mail sent")
Else
MsgBox($MB_SYSTEMMODAL, "Error!", "Mail failed with error code " & $iErr)
EndIf
Local $sRange = "1-" & UBound($as_Body)-1
_ArrayDelete($as_Body, $sRange)
$log_string = ""
EndIf
EndFunc