Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- pastemon.pl.orig 2012-10-04 12:00:00.000000000 -0100
- +++ pastemon.pl 2012-10-04 12:00:01.000000000 -0100
- @@ -97,6 +97,7 @@
- my $smtpFrom;
- my $smtpRecipient;
- my $smtpSubject;
- +my @smtpRecipients;
- my $distanceMin;
- my $distanceMaxSize;
- @@ -348,8 +349,7 @@
- # Optional: Add sample of data
- my $safeData = $matches{0}[2];
- # Sanitize the data
- - $safeData =~ s/
- -//g;
- + $safeData =~ s/\r/\\r/g;
- $safeData =~ s/\n/\\n/g;
- $safeData =~ s/\t/\\t/g;
- $buffer = $buffer . "| Sample: " . $safeData;
- @@ -366,7 +366,7 @@
- if ($smtpServer) {
- my $smtp = Net::SMTP->new($smtpServer) or die "Cannot create SMTP connection to $smtpServer: $?";
- $smtp->mail($smtpFrom);
- - $smtp->to($smtpRecipient);
- + $smtp->recipient(@smtpRecipients, { SkipBad => 1 });
- $smtp->data();
- my $subjectTags;
- for $key (keys %matches) {
- @@ -601,6 +601,8 @@
- $smtpRecipient = $node->find('recipient')->string_value;
- $smtpSubject = $node->find('subject')->string_value;
- }
- +
- + @smtpRecipients = split (/[, ]+/, $smtpRecipient);
- # ---------------------
- # Parameters validation
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement