{"thread":{"id":"21059","subject":"[PATCH] fix obscure perl message when encryption=tls and smtp cannot connect.","startedAt":"2009-09-25T21:30:13Z","lastAt":"2009-09-25T21:39:52Z","messageCount":3,"participants":["iler.ml@gmail.com","Shawn O. Pearce","Yakov Lerner"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"123808","messageId":"1253914213-22274-1-git-send-email-iler.ml@gmail.com","threadId":"21059","inReplyTo":null,"subject":"[PATCH] fix obscure perl message when encryption=tls and smtp cannot connect.","fromName":"","fromEmail":"iler.ml@gmail.com","sentAt":"2009-09-25T21:30:13Z","receivedAt":"2009-09-25T21:30:13Z","isPatch":true,"sender":{"key":"iler.ml@gmail.com","avatar":null},"body":"When encryption=tls and smtp cannot connect, git-send-email prints following perl error:\n\nCan't call method \"command\" on an undefined value at /usr/local/libexec/git-core/git-send-email line 927.\n\n(ithis is when smtp host orport is misspelled, or network is down, and encryption is tls).\nWe expect some familiar \"Cannot connect to SERVER:PORT\" message.\nFix it to print normal \"smtp can't connect\" diagnostics.\n\n--- /usr/local/libexec/git-core/git-send-email.000\t2009-09-26 00:10:01.000000000 +0300\n+++ /usr/local/libexec/git-core/git-send-email\t2009-09-26 00:11:39.000000000 +0300\n@@ -922,7 +922,7 @@\n \t\t\t$smtp ||= Net::SMTP->new((defined $smtp_server_port)\n \t\t\t\t\t\t ? \"$smtp_server:$smtp_server_port\"\n \t\t\t\t\t\t : $smtp_server);\n-\t\t\tif ($smtp_encryption eq 'tls') {\n+\t\t\tif ($smtp_encryption eq 'tls' && $smtp) {\n \t\t\t\trequire Net::SMTP::SSL;\n \t\t\t\t$smtp->command('STARTTLS');\n \t\t\t\t$smtp->response();\n"},{"id":"123810","messageId":"20090925213440.GX14660@spearce.org","threadId":"21059","inReplyTo":"1253914213-22274-1-git-send-email-iler.ml@gmail.com","subject":"Re: [PATCH] fix obscure perl message when encryption=tls and smtp cannot connect.","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-09-25T21:34:40Z","receivedAt":"2009-09-25T21:34:40Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"iler.ml@gmail.com wrote:\n> When encryption=tls and smtp cannot connect, git-send-email prints following perl error:\n> \n> Can't call method \"command\" on an undefined value at /usr/local/libexec/git-core/git-send-email line 927.\n> \n> (ithis is when smtp host orport is misspelled, or network is down, and encryption is tls).\n> We expect some familiar \"Cannot connect to SERVER:PORT\" message.\n> Fix it to print normal \"smtp can't connect\" diagnostics.\n\nThanks, looks reasonable.  Signed-off-by line, per the Developer's\nCertificate of Origin in Documentation/SubmittingPatches ?\n \n> --- /usr/local/libexec/git-core/git-send-email.000\t2009-09-26 00:10:01.000000000 +0300\n> +++ /usr/local/libexec/git-core/git-send-email\t2009-09-26 00:11:39.000000000 +0300\n> @@ -922,7 +922,7 @@\n>  \t\t\t$smtp ||= Net::SMTP->new((defined $smtp_server_port)\n>  \t\t\t\t\t\t ? \"$smtp_server:$smtp_server_port\"\n>  \t\t\t\t\t\t : $smtp_server);\n> -\t\t\tif ($smtp_encryption eq 'tls') {\n> +\t\t\tif ($smtp_encryption eq 'tls' && $smtp) {\n>  \t\t\t\trequire Net::SMTP::SSL;\n>  \t\t\t\t$smtp->command('STARTTLS');\n>  \t\t\t\t$smtp->response();\n\n-- \nShawn.\n"},{"id":"123811","messageId":"f36b08ee0909251439o38b8e414nc7621085d7489ade@mail.gmail.com","threadId":"21059","inReplyTo":"20090925213440.GX14660@spearce.org","subject":"Re: [PATCH] fix obscure perl message when encryption=tls and smtp cannot connect.","fromName":"Yakov Lerner","fromEmail":"iler.ml@gmail.com","sentAt":"2009-09-25T21:39:52Z","receivedAt":"2009-09-25T21:39:52Z","isPatch":true,"sender":{"key":"iler.ml@gmail.com","avatar":null},"body":"On Sat, Sep 26, 2009 at 00:34, Shawn O. Pearce <spearce@spearce.org> wrote:\n>\n> iler.ml@gmail.com wrote:\n> > When encryption=tls and smtp cannot connect, git-send-email prints following perl error:\n> >\n> > Can't call method \"command\" on an undefined value at /usr/local/libexec/git-core/git-send-email line 927.\n> >\n> > (ithis is when smtp host orport is misspelled, or network is down, and encryption is tls).\n> > We expect some familiar \"Cannot connect to SERVER:PORT\" message.\n> > Fix it to print normal \"smtp can't connect\" diagnostics.\n>\n> Thanks, looks reasonable.  Signed-off-by line, per the Developer's\n> Certificate of Origin in Documentation/SubmittingPatches ?\n\n\nSigned-off-by: Yakov Lerner <iler.ml@gmail.com>\n\n>\n> > --- /usr/local/libexec/git-core/git-send-email.000    2009-09-26 00:10:01.000000000 +0300\n> > +++ /usr/local/libexec/git-core/git-send-email        2009-09-26 00:11:39.000000000 +0300\n> > @@ -922,7 +922,7 @@\n> >                       $smtp ||= Net::SMTP->new((defined $smtp_server_port)\n> >                                                ? \"$smtp_server:$smtp_server_port\"\n> >                                                : $smtp_server);\n> > -                     if ($smtp_encryption eq 'tls') {\n> > +                     if ($smtp_encryption eq 'tls' && $smtp) {\n> >                               require Net::SMTP::SSL;\n> >                               $smtp->command('STARTTLS');\n> >                               $smtp->response();\n>\n\n\nYakov\n"}]}