{"thread":{"id":"25006","subject":"[PATCH v5 1/3] Minor indentation fix.","startedAt":"2010-09-06T18:12:08Z","lastAt":"2010-09-06T18:12:11Z","messageCount":4,"participants":["Pascal Obry"],"isPatch":true,"patchVersion":5,"patchTotal":3},"messages":[{"id":"150105","messageId":"1283796731-4540-1-git-send-email-pascal@obry.net","threadId":"25006","inReplyTo":null,"subject":"[PATCH v5 0/3] Add support for SMTP server options","fromName":"Pascal Obry","fromEmail":"pascal@obry.net","sentAt":"2010-09-06T18:12:08Z","receivedAt":"2010-09-06T18:12:08Z","isPatch":true,"sender":{"key":"pascal@obry.net","avatar":"https://avatars.githubusercontent.com/u/467069?v=4"},"body":"This is v5 of the patch thanks to Junio and AEvar for the review and help.\n\ncontext:\n--------\n\nI'm not familiar at all with Perl so comments on style or usage most\nwelcomed. This patch is to introduce a way to pass specific options to the\nSMTP server used by git-send-email.\n\nI need that to be able to use different SMTP account (wanadoo, gmail...) on\nsome Git repositories to send over proper identity.\n\nchange since v4:\n----------------\n\nAdd the missing signed-off-by.\n\nchange since v3:\n----------------\n\nI have moved smtp server option description after smtp server port. Seems\nmore natural to me.\n\nI have added note about the fact that multiple lines are needed for each\noption in configuration files.\n\npatches:\n--------\n\nThe two first patches are really code clean-up found while working on this\nnew feature. The last patch is the actual implementation of this new\nfeature.\n\nPascal Obry (3):\n  Minor indentation fix.\n  Remove @smtp_host_parts variable as not used.\n  New send-email option smtpserveroption.\n\n Documentation/config.txt         |    1 +\n Documentation/git-send-email.txt |    9 +++++++++\n git-send-email.perl              |   12 +++++++++---\n 3 files changed, 19 insertions(+), 3 deletions(-)\n\n-- \n1.7.2.2.277.gb49c4\n"},{"id":"150102","messageId":"1283796731-4540-2-git-send-email-pascal@obry.net","threadId":"25006","inReplyTo":"1283796731-4540-1-git-send-email-pascal@obry.net","subject":"[PATCH v5 1/3] Minor indentation fix.","fromName":"Pascal Obry","fromEmail":"pascal@obry.net","sentAt":"2010-09-06T18:12:09Z","receivedAt":"2010-09-06T18:12:09Z","isPatch":true,"sender":{"key":"pascal@obry.net","avatar":"https://avatars.githubusercontent.com/u/467069?v=4"},"body":"\nSigned-off-by: Pascal Obry <pascal@obry.net>\n---\n git-send-email.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 6dab3bf..0063606 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -212,7 +212,7 @@ my %config_settings = (\n     \"smtpserverport\" => \\$smtp_server_port,\n     \"smtpuser\" => \\$smtp_authuser,\n     \"smtppass\" => \\$smtp_authpass,\n-\t\"smtpdomain\" => \\$smtp_domain,\n+    \"smtpdomain\" => \\$smtp_domain,\n     \"to\" => \\@to,\n     \"cc\" => \\@initial_cc,\n     \"cccmd\" => \\$cc_cmd,\n-- \n1.7.3.rc0\n"},{"id":"150104","messageId":"1283796731-4540-3-git-send-email-pascal@obry.net","threadId":"25006","inReplyTo":"1283796731-4540-1-git-send-email-pascal@obry.net","subject":"[PATCH v5 2/3] Remove @smtp_host_parts variable as not used.","fromName":"Pascal Obry","fromEmail":"pascal@obry.net","sentAt":"2010-09-06T18:12:10Z","receivedAt":"2010-09-06T18:12:10Z","isPatch":true,"sender":{"key":"pascal@obry.net","avatar":"https://avatars.githubusercontent.com/u/467069?v=4"},"body":"Signed-off-by: Pascal Obry <pascal@obry.net>\n---\n git-send-email.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 0063606..39cb5af 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -189,7 +189,7 @@ sub do_edit {\n # Variables with corresponding config settings\n my ($thread, $chain_reply_to, $suppress_from, $signed_off_by_cc, $cc_cmd);\n my ($smtp_server, $smtp_server_port, $smtp_authuser, $smtp_encryption);\n-my ($identity, $aliasfiletype, @alias_files, @smtp_host_parts, $smtp_domain);\n+my ($identity, $aliasfiletype, @alias_files, $smtp_domain);\n my ($validate, $confirm);\n my (@suppress_cc);\n my ($auto_8bit_encoding);\n-- \n1.7.3.rc0\n"},{"id":"150103","messageId":"1283796731-4540-4-git-send-email-pascal@obry.net","threadId":"25006","inReplyTo":"1283796731-4540-1-git-send-email-pascal@obry.net","subject":"[PATCH v5 3/3] New send-email option smtpserveroption.","fromName":"Pascal Obry","fromEmail":"pascal@obry.net","sentAt":"2010-09-06T18:12:11Z","receivedAt":"2010-09-06T18:12:11Z","isPatch":true,"sender":{"key":"pascal@obry.net","avatar":"https://avatars.githubusercontent.com/u/467069?v=4"},"body":"The new command line parameter --smtp-server-option or default\nconfiguration sendemail.smtpserveroption can be used to pass\nspecific options to the SMTP server. Update the documentation\naccordingly.\n\nSigned-off-by: Pascal Obry <pascal@obry.net>\n---\n Documentation/config.txt         |    1 +\n Documentation/git-send-email.txt |    9 +++++++++\n git-send-email.perl              |    8 +++++++-\n 3 files changed, 17 insertions(+), 1 deletions(-)\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 0510ac7..d318c31 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -1716,6 +1716,7 @@ sendemail.to::\n sendemail.smtpdomain::\n sendemail.smtpserver::\n sendemail.smtpserverport::\n+sendemail.smtpserveroption::\n sendemail.smtpuser::\n sendemail.thread::\n sendemail.validate::\ndiff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt\nindex c283084..cde404a 100644\n--- a/Documentation/git-send-email.txt\n+++ b/Documentation/git-send-email.txt\n@@ -165,6 +165,15 @@ user is prompted for a password while the input is masked for privacy.\n \tare also accepted. The port can also be set with the\n \t'sendemail.smtpserverport' configuration variable.\n \n+--smtp-server-option=<option>::\n+\tIf set, specifies the outgoing SMTP server option to use.\n+\tDefault value can be specified by the 'sendemail.smtpserveroption'\n+\tconfiguration option.\n++\n+The --smtp-server-option option must be repeated for each option you want\n+to pass to the server. Likewise, different lines in the configuration files\n+must be used for each option.\n+\n --smtp-ssl::\n \tLegacy alias for '--smtp-encryption ssl'.\n \ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 39cb5af..47989fe 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -60,6 +60,7 @@ git send-email [options] <file | directory | rev-list options >\n     --envelope-sender       <str>  * Email envelope sender.\n     --smtp-server       <str:int>  * Outgoing SMTP server to use. The port\n                                      is optional. Default 'localhost'.\n+    --smtp-server-option    <str>  * Outgoing SMTP server option to use.\n     --smtp-server-port      <int>  * Outgoing SMTP server port.\n     --smtp-user             <str>  * Username for SMTP-AUTH.\n     --smtp-pass             <str>  * Password for SMTP-AUTH; not necessary.\n@@ -188,7 +189,8 @@ sub do_edit {\n \n # Variables with corresponding config settings\n my ($thread, $chain_reply_to, $suppress_from, $signed_off_by_cc, $cc_cmd);\n-my ($smtp_server, $smtp_server_port, $smtp_authuser, $smtp_encryption);\n+my ($smtp_server, $smtp_server_port, @smtp_server_options);\n+my ($smtp_authuser, $smtp_encryption);\n my ($identity, $aliasfiletype, @alias_files, $smtp_domain);\n my ($validate, $confirm);\n my (@suppress_cc);\n@@ -210,6 +212,7 @@ my %config_bool_settings = (\n my %config_settings = (\n     \"smtpserver\" => \\$smtp_server,\n     \"smtpserverport\" => \\$smtp_server_port,\n+    \"smtpserveroption\" => \\@smtp_server_options,\n     \"smtpuser\" => \\$smtp_authuser,\n     \"smtppass\" => \\$smtp_authpass,\n     \"smtpdomain\" => \\$smtp_domain,\n@@ -279,6 +282,7 @@ my $rc = GetOptions(\"sender|from=s\" => \\$sender,\n \t\t    \"no-bcc\" => \\$no_bcc,\n \t\t    \"chain-reply-to!\" => \\$chain_reply_to,\n \t\t    \"smtp-server=s\" => \\$smtp_server,\n+\t\t    \"smtp-server-option=s\" => \\@smtp_server_options,\n \t\t    \"smtp-server-port=s\" => \\$smtp_server_port,\n \t\t    \"smtp-user=s\" => \\$smtp_authuser,\n \t\t    \"smtp-pass:s\" => \\$smtp_authpass,\n@@ -1015,6 +1019,8 @@ X-Mailer: git-send-email $gitversion\n \t\t}\n \t}\n \n+\tunshift (@sendmail_parameters, @smtp_server_options);\n+\n \tif ($dry_run) {\n \t\t# We don't want to send the email.\n \t} elsif ($smtp_server =~ m#^/#) {\n-- \n1.7.3.rc0\n"}]}