git: quote sendemail section header

This will allow, e.g., the character `@` in the email identity.

Also adds a test case.

Fixes #557
This commit is contained in:
Robert Helgesson 2019-01-29 18:17:24 +01:00
parent 02a5a678f6
commit 45cadbd4f3
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
5 changed files with 77 additions and 1 deletions

View file

@ -151,7 +151,7 @@ in
hasSmtp = name: account: account.smtp != null;
genIdentity = name: account: with account;
nameValuePair "sendemail.${name}" ({
nameValuePair "sendemail \"${name}\"" ({
smtpEncryption = if smtp.tls.enable then "tls" else "";
smtpServer = smtp.host;
smtpUser = userName;