aboutsummaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2006-06-01 00:55:47 +0200
committerJunio C Hamano <junkio@cox.net>2006-05-31 16:17:15 -0700
commit87840620fd77e39a0df91dc8b8db6cfdb5e4845a (patch)
tree6a1da7c9dc966d6bff6514e6b8c9c99655a56999 /git-send-email.perl
parent6891281cfa1a7c0d70ec76e80c5f87f518cdb160 (diff)
downloadgit-87840620fd77e39a0df91dc8b8db6cfdb5e4845a.tar.gz
git-87840620fd77e39a0df91dc8b8db6cfdb5e4845a.tar.xz
send-email: only 'require' instead of 'use' Net::SMTP
This was proposed by Eric Wong and fixes the test. (Of course, git-send-email does not work, if there is no Net::SMTP here, but it will say what is wrong when you actually try to use send-email.) Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 0e368fff0..ed1d89b3f 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -21,7 +21,6 @@ use warnings;
use Term::ReadLine;
use Getopt::Long;
use Data::Dumper;
-use Net::SMTP;
# most mail servers generate the Date: header, but not all...
$ENV{LC_ALL} = 'C';
@@ -394,6 +393,7 @@ X-Mailer: git-send-email $gitversion
print $sm "$header\n$message";
close $sm or die $?;
} else {
+ require Net::SMTP;
$smtp ||= Net::SMTP->new( $smtp_server );
$smtp->mail( $from ) or die $smtp->message;
$smtp->to( @recipients ) or die $smtp->message;