Thread Problem: Aus @ wird%40. (22 answers)
Opened by Gast at 2008-05-19 11:20

Gast Gast
 2008-05-21 15:02
#110054 #110054
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
foreach $pair (@pairs) {
($name, $value) = split(/=/, $pair);

# Un-Webify plus signs and %-encoding
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$value =~ s/<!--(.|\n)*-->//g;

if ($allow_html != 1) {
$value =~ s/<([^>]|\n)*>//g;
}

$FORM{$name} = $value;
if ($name ne 'Submit')
{
print FILE $name;
print FILE "=";
print FILE $value;
print FILE "\n";
print HTMLFILE "<TR>\n";
print HTMLFILE "<TD>";
print HTMLFILE $name;
print HTMLFILE "</TD>\n";
print HTMLFILE "<TD>";
print HTMLFILE $value;
print HTMLFILE "</TD>\n";
print HTMLFILE "</TR>\n";
}
}

print HTMLFILE "</TABLE>";
print HTMLFILE "</BODY>";
print HTMLFILE "</HTML>";

close (FILE);
close (HTMLFILE);

my $emaillinks;
my $emailrechts;
($emaillinks, $emailrechts) = split(/@/, $email);
$cc_address = $emaillinks."\@".$emailrechts;

print "Content-type: text/html\n\n";
print "<br><br><CENTER>\n";
print "<h2>Blablabla\n";

#Email variables.


$mail_server = "xxx";
$from_address = "xxx";
$to_address = $TmpEmailAddressto;
$subject = $lastname." ".$firstname." xxx";
$body = "body";
$mimeType = "text/html";
$message_body = "<HTML><BODY><CENTER><h2>Absender: ".$lastname." ".$firstname." ".$ValA."</H2></CENTER></BODY></HTML>";

MIME::Lite->send("smtp", $mail_server);

# Create the initial text of the message
$mime_msg = MIME::Lite->new(
From => $from_address,
To => $to_address,
Cc => $cc_address,
Subject => $subject,
Type => $mimeType,
Data => $message_body
) or die "Error creating MIME body: $!\n";

$mime_msg->attach(
Type => "text/html",
Disposition => "attachment",
Path => $htmlfilename,
Filename => $htmlfilename,
);

$mime_msg->send();

View full thread Problem: Aus @ wird%40.