$initial_reply_to =~ s/(^\s+|\s+$)//g;
}
+if (!$smtp_server) {
+ $smtp_server = $repo->config('sendemail.smtpserver');
+}
if (!$smtp_server) {
foreach (qw( /usr/sbin/sendmail /usr/lib/sendmail )) {
if (-x $_) {
}
my ($author_name) = ($from =~ /^(.*?)\s+</);
- if ($author_name =~ /\./ && $author_name !~ /^".*"$/) {
+ if ($author_name && $author_name =~ /\./ && $author_name !~ /^".*"$/) {
my ($name, $addr) = ($from =~ /^(.*?)(\s+<.*)/);
$from = "\"$name\"$addr";
}
$2, $_) unless $quiet;
push @cc, $2;
}
- elsif (/^[-A-Za-z]+:\s+\S/) {
+ elsif (!/^Date:\s/ && /^[-A-Za-z]+:\s+\S/) {
push @xh, $_;
}