* [PATCH] send-email: only 'require' instead of 'use' Net::SMTP
@ 2006-05-31 22:55 Johannes Schindelin
0 siblings, 0 replies; only message in thread
From: Johannes Schindelin @ 2006-05-31 22:55 UTC (permalink / raw
To: git, junkio, Eric Wong
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>
---
git-send-email.perl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 0e368ff..ed1d89b 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;
--
1.3.3.gc46d3-dirty
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-05-31 22:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-31 22:55 [PATCH] send-email: only 'require' instead of 'use' Net::SMTP Johannes Schindelin
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).