3

I am trying send patch to linux-mailing list using git send-email but it is failing with following error

Unable to initialize SMTP properly. 
Check config and use --smtp-debug. 

VALUES: server=smtp.gmail.com 
        encryption=tls 
        maildomain=xyz.domain.name at /usr/libexec/git-core/git-send-email line 1040.

following are my smtp setting

[sendemail]
    smtpEncryption=tls
    smtpServer=smtp.gmail.com
    smtpUser=xyz@gmail.com
    smtpServerPort = 587

Am I missing anything? Please Help!! Thanks

parsley72
  • 8,449
  • 8
  • 65
  • 98
user3156262
  • 346
  • 2
  • 13

2 Answers2

0

Did you tried to add --smtp-ssl-cert-path ''? This disables ssl certification.

FelixSFD
  • 6,052
  • 10
  • 43
  • 117
YesThatIsMyName
  • 1,585
  • 3
  • 23
  • 30
-1

You have missed the password configuration

git config --global sendemail.smtppass <password>

Since you did not supply any password you cannot send the mail.

CodeWizard
  • 128,036
  • 21
  • 144
  • 167
  • No I have tried that also but unable to send email. also if you can see error message is no where related to password configuration. Password config is optional according to man page. If you dont configure password it prompts for it while sending mail – user3156262 Jan 05 '16 at 05:35
  • I'm not entirely sure about the siutation in 2016, but this is wrong for todays git-send-email (and according to @user3156262 it's wrong for that time as well). You should never provide passwords with your shell, because they can be easily read via your history file and is a security problem. git send-email will ask you for a password if you don't provide one. – hellow Feb 17 '21 at 14:45