Hallo Leute,
ich habe das Problem, wenn ich mit der Script (siehe unten) von Schnitzel die E-mail verschicke, das die Umlaute im Betreff und der Nachrichtentext in der erhaltende E-Mail (siehe das Bild ganz unten) nicht korrekt dargestellt sind.
Lässt sich dies beheben?
[Blockierte Grafik: http://www.imgbox.de/users/public/images/3KLInWOt4U.jpg]
E-Mail.au3
[autoit]#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=send-mail.ico
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#include <Array.au3>
#include <GUIConstantsEx.au3>
#include <Inet.au3>
Global $section, $combodata
$section = IniReadSection("Email.ini", "Emails")
Dim $Checkbox[$Section[0][0]+1]
_ArraySort($section, 0, 0, 0, 0)
$Form1 = GUICreate("e-mail Programm", 400, Round($section[0][0]/2)*20+290)
For $i = 1 To $Section[0][0]
$Checkbox[$i] = GUICtrlCreateCheckbox($Section[$i][0], 205 - Mod($i, 2)*200, 5 + (Round($i/2) - 1)*20, 190, 25)
Next
$label1 = GUICtrlCreateLabel("_________________________________________________________________", 5, (Mod($section[0][0], 2) +Round($i/2) - 1)*20 +4, 390, 25)
$label2 = GUICtrlCreateLabel("Betreff:", 5, 18 + (Mod($section[0][0], 2) +Round($i/2) - 1)*20, 390, 25)
GUICtrlSetColor(-1, 0x1B79D9)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Input1 = GUICtrlCreateInput(IniRead("Email.ini", "Standards", "Betreff", ""), 5, 35 + (Mod($section[0][0], 2) +Round($i/2) - 1)*20, 390, 25)
GUICtrlSetBkColor(-1, 0xFFFFE1)
$label2 = GUICtrlCreateLabel("Nachrichttext:", 5, 78 + (Mod($section[0][0], 2) +Round($i/2) - 1)*20, 390, 25)
GUICtrlSetColor(-1, 0x1B79D9)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Edit1 = GUICtrlCreateEdit(StringReplace(IniRead("Email.ini", "Standards", "Nachricht", ""), " |@CRLF| ", @CRLF) , 5, 95 + (Mod($section[0][0], 2) +Round($i/2) - 1)*20, 390, 100)
GUICtrlSetBkColor(-1, 0xFFFFE1)
$label3 = GUICtrlCreateLabel("Empfänger:", 5, 213 + (Mod($section[0][0], 2) +Round($i/2) - 1)*20, 390, 25)
GUICtrlSetColor(-1, 0x1B79D9)
GUICtrlSetFont(-1, 10, 800, 0, "MS Sans Serif")
$Input2 = GUICtrlCreateInput("", 5, 230 + (Mod($section[0][0], 2) +Round($i/2) - 1)*20, 390, 25)
GUICtrlSetBkColor(-1, 0xA6CAF0)
$Button1 = GUICtrlCreateButton("Standards speichern", 5, 260 + (Mod($section[0][0], 2) +Round($i/2) - 1)*20, 150, 25)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Button3 = GUICtrlCreateButton("ini öffnen", 170, 260 + (Mod($section[0][0], 2) +Round($i/2) - 1)*20, 90, 25)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
$Button2 = GUICtrlCreateButton("Email senden", 275, 260 + (Mod($section[0][0], 2) +Round($i/2) - 1)*20, 120, 25)
GUICtrlSetFont(-1, 10, 400, 0, "MS Sans Serif")
GUICtrlSetBkColor(-1, 0xC0DCC0)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Checkbox[1] To $Checkbox[$Section[0][0]]
$emails = ""
For $i = 1 To $Section[0][0]
If BitAnd(GUICtrlRead($Checkbox[$i]), $GUI_CHECKED) Then
$emails &= $Section[$i][1] & "; "
EndIf
Next
Guictrlsetdata($Input2, $emails)
Case $Button1
IniWrite("Email.ini", "Standards", "Betreff", GUICtrlRead($Input1))
IniWrite("Email.ini", "Standards", "Nachricht", StringReplace(GUICtrlRead($Edit1), @CRLF, " |@CRLF| "))
Case $Button2
_INetMail(GUICtrlRead($Input2), GUICtrlRead($Input1), GUICtrlRead($Edit1) & @CRLF)
WinWaitActive("[CLASS:rctrl_renwnd32]")
Send("^{End}")
Send("{ALTDOWN}h{ALTUP}g")
sleep(500)
Send("{ENTER}")
sleep(500)
Send("!s")
Case $Button3
Shellexecute(@ScriptDir & "\Email.ini")
EndSwitch
WEnd
Email.ini
[autoit]
[Emails]
Klaus=klaus@anbieter.de
Peter=peter@anbieter.de
Claudia=claudia@anbieter.de
Susi=susi@anbieter.de
Rodi=rodi@anbieter.de
[Standards]
Betreff=Projekt 60125 Köln Bürogebäude ist angelegt
Nachricht=Projektnr.: 60125 |@CRLF| Projektname: Köln Bürogebäude |@CRLF| ist unter T:\PRJ\2012 angelegt.
[Blockierte Grafik: http://www.imgbox.de/users/public/images/5O4w3r3g6M.jpg]
Viele Grüße,
Dino