Du hast die Variablen zwar deklariert, allerdings außerhalb der Funktion, in
der die Mail-Funktion aufgerufen wird. Dort verlieren sie ihren 'scope', ihren
Wirkungsbereich, dort sind sie nicht mehr zuständig. Außer du deklariest sie
als Global.
Diese Aussage ist falsch!
Variablen, die im Hauptprogramm deklariert werden, sind (in AutoIt) automatisch global.
Zitat aus der Hilfe: "A variable's scope is controlled by when and how you declare the variable. If you declare a variable at the start of your script and outside any functions it exists in the Global scope and can be read or changed from anywhere in the script."
Sein Problem besteht eher darin, dass er den Variablen Leerstrings übergeben hat.