git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: t9001 fails because Net::SMTP is missing

From
Junio C Hamano <junkio@cox.net>
Date
May 31, 2006, 00:34 UTC
Message-ID
<7v8xojyqu3.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.63.0605302125310.11586@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 8 quoted lines
> is it unexpected that there are setups which come without Net::SMTP?
>
> -- snip --
> * expecting success: git format-patch -n HEAD^1
>      git send-email -from="Example <nobody@example.com>" 
> --to=nobody@example.com --smtp-server="$(pwd)/fake.sendmail" ./0001*txt
> 0001-Second.txt
> Can't locate Net/SMTP.pm in @INC (@INC contains: 
Hmm.  Something like this?
-- >8 --
diff --git a/git-send-email.perl b/git-send-email.perl
index 0e368ff..f7af8eb 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 {
+		use Net::SMTP;
 		$smtp ||= Net::SMTP->new( $smtp_server );
 		$smtp->mail( $from ) or die $smtp->message;
 		$smtp->to( @recipients ) or die $smtp->message;
Previous: Johannes SchindelinNext: Junio C Hamano
Message 2 of 6 in “t9001 fails because Net::SMTP is missing”
  1. Johannes SchindelinMay 30, 2006
  2. Junio C HamanoMay 31, 2006
  3. Junio C HamanoMay 31, 2006
  4. Morten WelinderMay 31, 2006
  5. Eric WongMay 31, 2006
  6. Johannes SchindelinMay 31, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.