David Goodwin committed 2020-06-02 12:56:18 +01:00
1 parent 2bb2460bf3
commit befc18154f
1 file changed
+4 -3
+4 -3
View File
@@ -440,7 +440,7 @@ sub send_vacation_email {
$logger->debug("Will send vacation response for $orig_messageid: FROM: $email (orig_to: $orig_to), TO: $orig_from; VACATION SUBJECT: $row[0] ; VACATION BODY: $row[1]");
my $subject = $row[0];
$subject = Encode::decode_utf8( $subject ) if( !Encode::is_utf8( $subject ) );
$subject = Encode::decode_utf8( $subject ) if( !Encode::is_utf8( $subject ) );
$orig_subject = decode("mime-header", $orig_subject);
$subject =~ s/\$SUBJECT/$orig_subject/g;
if ($subject ne $row[0]) {
@@ -448,12 +448,13 @@ sub send_vacation_email {
}
my $body = $row[1];
$body = Encode::decode_utf8( $body ) if( !Encode::is_utf8( $body ) );
$body = Encode::decode_utf8( $body ) if( !Encode::is_utf8( $body ) );
my $from = $email;
my $to = $orig_from;
# part of the username in the email && part of the domain in the email
my ($email_username_part, $email_domain_part) = split(/@/, $email);
my ($email_username_part, $email_domain_part) = split(/@/, $orig_from);
my $resolver = Net::DNS::Resolver->new;
my @mx = mx($resolver, $email_domain_part);