E-Mail Client

  • Hi, ich habe auf auf dieser Seiteein cooles Script gefunden. Ich habe es ein wenig nach meinen Bedürfnissen angepasst. So sieht es aus:

    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Include<file.au3>

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    $SmtpServer = "mail.gmx.de"
    $IPPort = 25 ; port used for sending the mail
    $ssl = 0 ; enables/disables secure socket layer sending - put to 1 if using httpS
    $Importance = "Normal"
    $AttachFiles = "" ; the file(s) you want to attach seperated with a ; (Semicolon) - leave blank if not needed

    [/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit][autoit]

    $Form1 = GUICreate("Quick- & Safe Mail", 463, 474, 885, 121)
    $Password = GUICtrlCreateInput("", 176, 40, 265, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
    $FromAddress = GUICtrlCreateInput("", 176, 8, 265, 21)
    GUICtrlCreateLabel("Ihre E-Mail Ardresse", 8, 8, 98, 25)
    $Label1 = GUICtrlCreateLabel("Ihr Passwort", 8, 40, 62, 25)
    $ToAddress = GUICtrlCreateInput("", 176, 104, 265, 21)
    $Label2 = GUICtrlCreateLabel("E-Mail Adresse des Empfängers", 8, 112, 153, 17)
    $Subject = GUICtrlCreateInput("", 176, 232, 265, 21)
    $Label3 = GUICtrlCreateLabel("Betreff", 8, 232, 35, 17)
    $body = GUICtrlCreateEdit("", 176, 264, 265, 153)
    GUICtrlSetData(-1, "body")
    $Label4 = GUICtrlCreateLabel("Ihre Nachricht", 8, 272, 71, 17)
    $FromName = GUICtrlCreateInput("", 176, 72, 265, 21)
    $Label5 = GUICtrlCreateLabel("Ihr Name", 8, 72, 47, 17)
    $los = GUICtrlCreateButton("Verschicken", 0, 440, 305, 33)
    $Anhang = GUICtrlCreateButton("Anhang", 304, 440, 153, 33, $WS_GROUP)
    $CcAddress = GUICtrlCreateInput("", 176, 136, 265, 21)
    $BccAddress = GUICtrlCreateInput("", 176, 168, 265, 21)
    $Label6 = GUICtrlCreateLabel("ggf. Emfpänger 2", 8, 144, 85, 17)
    $Label7 = GUICtrlCreateLabel("ggf. Empfänger 3", 8, 176, 85, 17)
    GUISetState(@SW_SHOW)

    [/autoit][autoit][/autoit][autoit]

    $Username = $FromAddress

    [/autoit][autoit][/autoit][autoit]

    MsgBox (0,"","")

    [/autoit][autoit][/autoit][autoit]

    Global $oMyRet[2]
    Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")
    $rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl)
    If @error Then
    MsgBox(0, "Error sending message", "Error code:" & @error & " Description:" & $rc)
    EndIf
    ;
    ; The UDF
    Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance="Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0)
    Local $objEmail = ObjCreate("CDO.Message")
    $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>'
    $objEmail.To = $s_ToAddress
    Local $i_Error = 0
    Local $i_Error_desciption = ""
    If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress
    If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress
    $objEmail.Subject = $s_Subject
    If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then
    $objEmail.HTMLBody = $as_Body
    Else
    $objEmail.Textbody = $as_Body & @CRLF
    EndIf
    If $s_AttachFiles <> "" Then
    Local $S_Files2Attach = StringSplit($s_AttachFiles, ";")
    For $x = 1 To $S_Files2Attach[0]
    $S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x])
    ;~ ConsoleWrite('@@ Debug : $S_Files2Attach[$x] = ' & $S_Files2Attach[$x] & @LF & '>Error code: ' & @error & @LF) ;### Debug Console
    If FileExists($S_Files2Attach[$x]) Then
    ConsoleWrite('+> File attachment added: ' & $S_Files2Attach[$x] & @LF)
    $objEmail.AddAttachment($S_Files2Attach[$x])
    Else
    ConsoleWrite('!> File not found to attach: ' & $S_Files2Attach[$x] & @LF)
    SetError(1)
    Return 0
    EndIf
    Next
    EndIf
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer
    If Number($IPPort) = 0 then $IPPort = 25
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort
    ;Authenticated SMTP
    If $s_Username <> "" Then
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password
    EndIf
    If $ssl Then
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
    EndIf
    ;Update settings
    $objEmail.Configuration.Fields.Update
    ; Set Email Importance
    Switch $s_Importance
    Case "High"
    $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "High"
    Case "Normal"
    $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Normal"
    Case "Low"
    $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Low"
    EndSwitch
    $objEmail.Fields.Update
    ; Sent the Message
    $objEmail.Send
    If @error Then
    SetError(2)
    Return $oMyRet[1]
    EndIf
    $objEmail=""
    EndFunc ;==>_INetSmtpMailCom
    ;
    ;
    ; Com Error Handler
    Func MyErrFunc()
    $HexNumber = Hex($oMyError.number, 8)
    $oMyRet[0] = $HexNumber
    $oMyRet[1] = StringStripWS($oMyError.description, 3)
    ConsoleWrite("### COM Error ! Number: " & $HexNumber & " ScriptLine: " & $oMyError.scriptline & " Description:" & $oMyRet[1] & @LF)
    SetError(1); something to check for when this function returns
    Return
    EndFunc ;==>MyErrFunc

    [/autoit]

    So, nun kommt immer (!) diese Meldung:

    >"C:\Program Files (x86)\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\David\Desktop\mail2.au3"
    ### COM Error ! Number: 80020009 ScriptLine: 106 Description:Es ist mindestens ein Empfänger erforderlich, es wurde jedoch kein Empfänger gefunden.
    >Exit code: 0 Time: 42.597

    Was kann ich tun???

    Einmal editiert, zuletzt von meinnameisthase (12. Mai 2011 um 14:06)

  • Die Antwort steht doch in der Fehlermeldung

    Zitat

    Es ist mindestens ein Empfänger erforderlich, es wurde jedoch kein Empfänger gefunden.

    Also gibt es ein Problem beim Empfänger (evtl gibts ihn nicht oder du hast einen Fehler im Port oder so gemacht, aber sogut kenn ich micht nicht in der Funktion aus)

    mfg BB

    "IF YOU'RE GOING TO KILL IT
    OPEN SOURCE IT!"

    by Phillip Torrone

    Zitat von Shoutbox

    [Heute, 11:16] Andy: ....böseböseböseböse....da erinnere ich mich daran, dass man den Puschelschwanz eines KaRnickels auch "Blume" nennt....ob da eins zum anderen passt? :rofl: :rofl: :rofl: :rofl:

    https://autoit.de/index.php?page…leIt#post251138

    Neon Snake

  • MMh, aber wenn ich das Script so nehme wie es auf der seite steht und dann die daten einfüge geht es.

  • [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #Include<file.au3>

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    $SmtpServer = "mail.gmx.de"
    $IPPort = 25 ; port used for sending the mail
    $ssl = 0 ; enables/disables secure socket layer sending - put to 1 if using httpS
    $Importance = "Normal"
    $AttachFiles = "" ; the file(s) you want to attach seperated with a ; (Semicolon) - leave blank if not needed

    [/autoit][autoit][/autoit][autoit][/autoit][autoit][/autoit][autoit]

    GUICreate("Quick- & Safe Mail", 463, 474, 885, 121)
    $1 = GUICtrlCreateInput("", 176, 40, 265, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))
    $2 = GUICtrlCreateInput("", 176, 8, 265, 21)
    GUICtrlCreateLabel("Ihre E-Mail Ardresse", 8, 8, 98, 25)
    GUICtrlCreateLabel("Ihr Passwort", 8, 40, 62, 25)
    $3 = GUICtrlCreateInput("", 176, 104, 265, 21)
    GUICtrlCreateLabel("E-Mail Adresse des Empfängers", 8, 112, 153, 17)
    $4 = GUICtrlCreateInput("", 176, 232, 265, 21)
    GUICtrlCreateLabel("Betreff", 8, 232, 35, 17)
    $5 = GUICtrlCreateEdit("", 176, 264, 265, 153)
    GUICtrlSetData(-1, "")
    GUICtrlCreateLabel("Ihre Nachricht", 8, 272, 71, 17)
    $6 = GUICtrlCreateInput("", 176, 72, 265, 21)
    GUICtrlCreateLabel("Ihr Name", 8, 72, 47, 17)
    $los = GUICtrlCreateButton("Verschicken", 0, 440, 305, 33)
    $7 = GUICtrlCreateButton("Anhang", 304, 440, 153, 33, $WS_GROUP)
    $8 = GUICtrlCreateInput("", 176, 136, 265, 21)
    $9 = GUICtrlCreateInput("", 176, 168, 265, 21)
    GUICtrlCreateLabel("ggf. Emfpänger 2", 8, 144, 85, 17)
    GUICtrlCreateLabel("ggf. Empfänger 3", 8, 176, 85, 17)
    GUISetState(@SW_SHOW)

    [/autoit][autoit][/autoit][autoit]

    MsgBox (0,"","Zum Abschicken klicken")

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    $Password = GUICtrlRead ($1)
    $FromAddress = GUICtrlRead ($2)
    $ToAddress = GUICtrlRead ($3)
    $Subject = GUICtrlRead ($4)
    $body = GUICtrlRead ($5)
    $FromName = GUICtrlRead ($6)
    $Anhang = GUICtrlRead ($7)
    $CcAddress = GUICtrlRead ($8)
    $BccAddress = GUICtrlRead ($9)

    [/autoit][autoit][/autoit][autoit]

    $Username = GUICtrlRead ($2)

    [/autoit][autoit][/autoit][autoit][/autoit][autoit]

    Global $oMyRet[2]
    Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")
    $rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $Body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl)
    If @error Then
    MsgBox(0, "Da ging wohl was schief...", "Fehler Code: " & @error & " Beschreibung: " & $rc & " Kontaktieren Sie ggf. den Hersteller der Software.")
    EndIf
    ;
    ; The UDF
    Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance="Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0)
    Local $objEmail = ObjCreate("CDO.Message")
    $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>'
    $objEmail.To = $s_ToAddress
    Local $i_Error = 0
    Local $i_Error_desciption = ""
    If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress
    If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress
    $objEmail.Subject = $s_Subject
    If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then
    $objEmail.HTMLBody = $as_Body
    Else
    $objEmail.Textbody = $as_Body & @CRLF
    EndIf
    If $s_AttachFiles <> "" Then
    Local $S_Files2Attach = StringSplit($s_AttachFiles, ";")
    For $x = 1 To $S_Files2Attach[0]
    $S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x])
    ;~ ConsoleWrite('@@ Debug : $S_Files2Attach[$x] = ' & $S_Files2Attach[$x] & @LF & '>Error code: ' & @error & @LF) ;### Debug Console
    If FileExists($S_Files2Attach[$x]) Then
    ConsoleWrite('+> File attachment added: ' & $S_Files2Attach[$x] & @LF)
    $objEmail.AddAttachment($S_Files2Attach[$x])
    Else
    ConsoleWrite('!> File not found to attach: ' & $S_Files2Attach[$x] & @LF)
    SetError(1)
    Return 0
    EndIf
    Next
    EndIf
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer
    If Number($IPPort) = 0 then $IPPort = 25
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort
    ;Authenticated SMTP
    If $s_Username <> "" Then
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password
    EndIf
    If $ssl Then
    $objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
    EndIf
    ;Update settings
    $objEmail.Configuration.Fields.Update
    ; Set Email Importance
    Switch $s_Importance
    Case "High"
    $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "High"
    Case "Normal"
    $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Normal"
    Case "Low"
    $objEmail.Fields.Item ("urn:schemas:mailheader:Importance") = "Low"
    EndSwitch
    $objEmail.Fields.Update
    ; Sent the Message
    $objEmail.Send
    If @error Then
    SetError(2)
    Return $oMyRet[1]
    EndIf
    $objEmail=""
    EndFunc ;==>_INetSmtpMailCom
    ;
    ;
    ; Com Error Handler
    Func MyErrFunc()
    $HexNumber = Hex($oMyError.number, 8)
    $oMyRet[0] = $HexNumber
    $oMyRet[1] = StringStripWS($oMyError.description, 3)
    ConsoleWrite("### COM Error ! Number: " & $HexNumber & " ScriptLine: " & $oMyError.scriptline & " Description:" & $oMyRet[1] & @LF)
    SetError(1); something to check for when this function returns
    Return
    EndFunc ;==>MyErrFunc

    [/autoit]

    So sieht es bis jetzt aus. Geht auch prima (Button Anhang und Abschicken ist zwar noch ohne Funktion, aber das kommt noch ;) )

    Mein Problem: Das Abschicken. Man muss immer auf die MsgBox klicken, geht das nicht iwi, wenn ich auf Abschicken klicke?

  • Hallo meinnameisthase,

    herzlich willkommen im Forum und viel Spass mit AutoIt.

    Hier kannst du dir die deutsche Hilfe herunterladen.
    Hier gibt es ein AutoIt-Tutorial: http://wiki.autoit.de/wiki/index.php/TutorialSehr hilfreich ist auch das Buch von peethebee

    und jetzt zu deiner Frage, doch das geht:

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <EditConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>
    #include<file.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Global $oMyRet[2]
    Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")

    [/autoit] [autoit][/autoit] [autoit]

    $SmtpServer = "mail.gmx.de"
    $IPPort = 25 ; port used for sending the mail
    $ssl = 0 ; enables/disables secure socket layer sending - put to 1 if using httpS
    $Importance = "Normal"
    $AttachFiles = "" ; the file(s) you want to attach seperated with a ; (Semicolon) - leave blank if not needed

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    GUICreate("Quick- & Safe Mail", 463, 474, 885, 121)
    $1 = GUICtrlCreateInput("", 176, 40, 265, 21, BitOR($ES_PASSWORD, $ES_AUTOHSCROLL))
    $2 = GUICtrlCreateInput("", 176, 8, 265, 21)
    GUICtrlCreateLabel("Ihre E-Mail Ardresse", 8, 8, 98, 25)
    GUICtrlCreateLabel("Ihr Passwort", 8, 40, 62, 25)
    $3 = GUICtrlCreateInput("", 176, 104, 265, 21)
    GUICtrlCreateLabel("E-Mail Adresse des Empfängers", 8, 112, 153, 17)
    $4 = GUICtrlCreateInput("", 176, 232, 265, 21)
    GUICtrlCreateLabel("Betreff", 8, 232, 35, 17)
    $5 = GUICtrlCreateEdit("", 176, 264, 265, 153)
    GUICtrlSetData(-1, "")
    GUICtrlCreateLabel("Ihre Nachricht", 8, 272, 71, 17)
    $6 = GUICtrlCreateInput("", 176, 72, 265, 21)
    GUICtrlCreateLabel("Ihr Name", 8, 72, 47, 17)
    $los = GUICtrlCreateButton("Verschicken", 0, 440, 305, 33)
    $7 = GUICtrlCreateButton("Anhang", 304, 440, 153, 33, $WS_GROUP)
    $8 = GUICtrlCreateInput("", 176, 136, 265, 21)
    $9 = GUICtrlCreateInput("", 176, 168, 265, 21)
    GUICtrlCreateLabel("ggf. Emfpänger 2", 8, 144, 85, 17)
    GUICtrlCreateLabel("ggf. Empfänger 3", 8, 176, 85, 17)
    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE
    Exit
    Case $los
    $Password = GUICtrlRead($1)
    $FromAddress = GUICtrlRead($2)
    $ToAddress = GUICtrlRead($3)
    $Subject = GUICtrlRead($4)
    $body = GUICtrlRead($5)
    $FromName = GUICtrlRead($6)
    $Anhang = GUICtrlRead($7)
    $CcAddress = GUICtrlRead($8)
    $BccAddress = GUICtrlRead($9)

    [/autoit] [autoit][/autoit] [autoit]

    $Username = GUICtrlRead($2)
    $rc = _INetSmtpMailCom($SmtpServer, $FromName, $FromAddress, $ToAddress, $Subject, $body, $AttachFiles, $CcAddress, $BccAddress, $Importance, $Username, $Password, $IPPort, $ssl)
    If @error Then
    MsgBox(0, "Da ging wohl was schief...", "Fehler Code: " & @error & " Beschreibung: " & $rc & " Kontaktieren Sie ggf. den Hersteller der Software.")
    Else
    MsgBox(0, "Alles klar", "Nachricht versand!")
    EndIf
    EndSwitch
    WEnd

    [/autoit] [autoit][/autoit] [autoit]

    ;
    ; The UDF
    Func _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject = "", $as_Body = "", $s_AttachFiles = "", $s_CcAddress = "", $s_BccAddress = "", $s_Importance = "Normal", $s_Username = "", $s_Password = "", $IPPort = 25, $ssl = 0)
    Local $objEmail = ObjCreate("CDO.Message")
    $objEmail.From = '"' & $s_FromName & '" <' & $s_FromAddress & '>'
    $objEmail.To = $s_ToAddress
    Local $i_Error = 0
    Local $i_Error_desciption = ""
    If $s_CcAddress <> "" Then $objEmail.Cc = $s_CcAddress
    If $s_BccAddress <> "" Then $objEmail.Bcc = $s_BccAddress
    $objEmail.Subject = $s_Subject
    If StringInStr($as_Body, "<") And StringInStr($as_Body, ">") Then
    $objEmail.HTMLBody = $as_Body
    Else
    $objEmail.Textbody = $as_Body & @CRLF
    EndIf
    If $s_AttachFiles <> "" Then
    Local $S_Files2Attach = StringSplit($s_AttachFiles, ";")
    For $x = 1 To $S_Files2Attach[0]
    $S_Files2Attach[$x] = _PathFull($S_Files2Attach[$x])
    ;~ ConsoleWrite('@@ Debug : $S_Files2Attach[$x] = ' & $S_Files2Attach[$x] & @LF & '>Error code: ' & @error & @LF) ;### Debug Console
    If FileExists($S_Files2Attach[$x]) Then
    ConsoleWrite('+> File attachment added: ' & $S_Files2Attach[$x] & @LF)
    $objEmail.AddAttachment($S_Files2Attach[$x])
    Else
    ConsoleWrite('!> File not found to attach: ' & $S_Files2Attach[$x] & @LF)
    SetError(1)
    Return 0
    EndIf
    Next
    EndIf
    $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $s_SmtpServer
    If Number($IPPort) = 0 Then $IPPort = 25
    $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = $IPPort
    ;Authenticated SMTP
    If $s_Username <> "" Then
    $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
    $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = $s_Username
    $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $s_Password
    EndIf
    If $ssl Then
    $objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True
    EndIf
    ;Update settings
    $objEmail.Configuration.Fields.Update
    ; Set Email Importance
    Switch $s_Importance
    Case "High"
    $objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "High"
    Case "Normal"
    $objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "Normal"
    Case "Low"
    $objEmail.Fields.Item("urn:schemas:mailheader:Importance") = "Low"
    EndSwitch
    $objEmail.Fields.Update
    ; Sent the Message
    $objEmail.Send
    If @error Then
    SetError(2)
    Return $oMyRet[1]
    EndIf
    $objEmail = ""
    EndFunc ;==>_INetSmtpMailCom
    ;
    ;
    ; Com Error Handler
    Func MyErrFunc()
    $HexNumber = Hex($oMyError.number, 8)
    $oMyRet[0] = $HexNumber
    $oMyRet[1] = StringStripWS($oMyError.description, 3)
    ConsoleWrite("### COM Error ! Number: " & $HexNumber & " ScriptLine: " & $oMyError.scriptline & " Description:" & $oMyRet[1] & @LF)
    SetError(1); something to check for when this function returns
    Return
    EndFunc ;==>MyErrFunc

    [/autoit]

    du solltest auch die Reihenfolge deiner Einagbefelder anpassen, denn diese sind kreuz und quer durcheinanander,

    mfg autoBert

  • Ja so habe ich es jetzt auch.

    Hallo meinnameisthase,
    herzlich willkommen im Forum und viel Spass mit AutoIt.
    Hier kannst du dir die deutsche Hilfe herunterladen.
    Hier gibt es ein AutoIt-Tutorial: http://wiki.autoit.de/wiki/index.php/TutorialSehr hilfreich ist auch das Buch von peethebee

    Ähm, ich bin schon ein bisschen länger in diesem Forum (ich war vorher jemand anderes, habe den dann aber wieder gelöscht, das mache ich in allen Foren so,; dann kann man bei der Netzrecherch nach meinen Namen weniger finden 8) ) und ich weiß auch, wo man die deutsche Hilfe (naja, deutsch? "If you acquired this product in the United Kingdom, this EULA is governed by the laws of the United Kingdom. If this product was acquired outside the United Kingdom, then local law may apply.") findet. Jaja, ich weiß, meine Fragen sehen nicht so danach aus, aber ein bisschen Autoit kann ich schon (also die Grundlagen). :D

  • Jaja, ich weiß, meine Fragen sehen nicht so danach aus, aber ein bisschen Autoit kann ich schon (also die Grundlagen).


    nein sieht wirklich nicht danach aus,

    und ich weiß auch, wo man die deutsche Hilfe (...) findet.

    warum benutzt du sie nicht?

    Ähm, ich bin schon ein bisschen länger in diesem Forum (ich war vorher jemand anderes, habe den dann aber wieder gelöscht

    In diesem Forum kann man seinen Account nicht löschen, höchstens gelöscht werden.

    mfg autoBert

  • In diesem Forum kann man seinen Account nicht löschen, höchstens gelöscht werden.

    IMit ich habe mich gelöscht war gemeint, dass ich nach einem Script für ein illegales Programm fragte, um gelöscht zu werden. Und meistens ist es nur ein Befehl, der mir fehlt oder die zündende Idee und dann bringt die Hilfe meistens wenig.
    Achja, du klingst ein bisschen, als fühlst du dich durch den Post ein wenig angegriffen. Das war natürlich nicht beabsichtigt; im Gegenteil, ich finde es gut, dass du Neulingen hilfst