Re: [PATCH] send-email: support NNTP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 23, 2013 at 7:13 AM, Łukasz Stelmach <l.stelmach@xxxxxxxxxxx> wrote:
> Enable sending patches to NNTP servers (Usenet, Gmane).
> ---
> diff --git a/git-send-email.perl b/git-send-email.perl
> index bd13cc8..0356635 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -1174,6 +1249,18 @@ X-Mailer: git-send-email $gitversion
>
>         if ($dry_run) {
>                 # We don't want to send the email.
> +       } elsif ($email_protocol eq 'nntp') {
> +               if (!defined $nntp_server) {
> +                       die "The requires NNTP server is not properly defined."

s/requires/required/

> +               }
> +               require Net::NNTP;
> +               $nntp =  Net::NNTP->new(email_host_string(),
> +                                       Debug => $debug_net_nntp);
> +               email_auth_maybe or die $nntp->message;
> +               $nntp->post or die $nntp->message;
> +               $nntp->datasend("$header\n$message") or die $nntp->message;
> +               $nntp->dataend() or die $nntp->message;
> +               $nntp->code eq "240" or die "Failed to send $subject\n".$nntp->message;
>         } elsif ($smtp_server =~ m#^/#) {
>                 my $pid = open my $sm, '|-';
>                 defined $pid or die $!;
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]