Thread Sendmail für Windows (18 answers)
Opened by Drain at 2003-08-22 15:57

Drain
 2003-08-29 13:40
#1223 #1223
User since
2003-08-21
26 Artikel
BenutzerIn
[default_avatar]
OK, danke. Es funktioniert. Das mit dem system-Befehl ist mir neu.
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
sub Blat {
        my $Mail_Prog = 'blat.exe';
        my $commandline = $Mail_Prog;
        $commandline .= " -";                                                                                   # attach no file
        $commandline .= " -to xxx\@yyy.de";                                             # To
        $commandline .= " -f \"$Formular{Name} $Formular{Email}\"";     # From
        $commandline .= " -s \"Formular Homepage (Blat)\"";                             # Subject
        $commandline .= " -body \"";                                                                    # Body
        $commandline .= &MailBody;                                                                              # Body
        $commandline .= "\"";                                                                                  # Body
        $commandline .= " -log blatlog.txt";                                                    # Create Logfile for testing
        # Senden der Email
        system($commandline);


Jetzt habe ich noch ein kleines Problem. In dem Unterprogramm &MailBody wird der Email-Inhalt zusammengestellt. Darin ist unter anderem die im Formular eingegebene Email-Adresse. Jetzt macht mir aber in meiner Vorgehensweise das @-Zeichen Probleme. Müßte davor manuell ein "\" setzen, sonst klappt der Aufruf von blat nicht. Wie ersetzt man in einem Skalar einen Zeichenausdruck? Muß ich das dann für alle Sonderzeichen machen? Oder gibt es da eine bessere Variante zur Lösung dieses Problems?

Drain\n\n

<!--EDIT|Drain|1062150751-->

View full thread Sendmail für Windows