6 Einträge, 1 Seite |
"To: [EMAIL=termin@tor.example]termin@tor.example[/EMAIL], Hans Meier <hans@meier.example>, [EMAIL=foo@bar.example]foo@bar.example[/EMAIL]"
1
2
3
$adressen[0] = [EMAIL=termin@tor.example]termin@tor.example[/EMAIL];
$adressen[1] = Hans Meier <hans@meier.example>;
$adressen[2] = [EMAIL=foo@bar.example]foo@bar.example[/EMAIL];
1
2
3
4
5
6
7
8
9
#@mail beinhaltet zeilenweise die Mail incl. Header
foreach my $line (@mail)
{
if ($line=~/^To:/)
{
$to = $line =~ m/(^To: .*)/si;
$File::Log::log->msg(4, "To Adressen: $to\n");
}
}
1
2
3
4
5
6
7
8
9
10
11
@mail beinhaltet zeilenweise die Mail incl. Header
foreach my $line (@mail)
{
if ($line=~/^To:/)
{
($to) = $line =~ m/^To: (.*)/si;
push @adressen, split(/,/, $to ); # Um sie bei den Kommata abzuteilen
#und ins Array $adressen zu sperren;)
$File::Log::log->msg(4, "To Adressen: $to\n");
}
}
1
2
3
4
5
6
7
8
9
10
11
12
my @recipients;
my $to;
foreach my $line (@mail)
{
if ($line=~/^To:/)
{
$to = $';
$File::Log::log->msg(4, "To Adressen: $to\n");
}
}
@recipients=split(/,/, $to);
@recipients=split(/,/, $to);
1
2
3
4
5
6
7
my @recipients;
foreach my $line (@mail) {
next unless $line =~ /^To:\s*/;
my $to = $';
$File::Log::log->msg(4, "To Adressen: $to\n");
push @recipients, [ split(/\s*,\s*/, $to) ];
}
6 Einträge, 1 Seite |