title: Sending email without keyfile (only certfile) using Python smtplib
body: <p>Trying to send email with a certificate file using the following script:</p>
  
  <pre><code>import smtplib
  
  client = smtplib.SMTP(myhost, myport)
  client.ehlo()
  client.starttls(certfile=mycertfile)
  client.ehlo()
  
  client.login(myusername, mypassword)
  client.sendmail(sender, receiver, Message)
  client.quit()
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>SSLError: error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib
  </code></pre>
  
  <p>I think documentations (<a href="https://docs.python.org/2/library/smtplib.html#smtplib.SMTP.starttls" rel="nofollow">smtplib.html</a> and <a href="https://docs.python.org/2/library/ssl.html" rel="nofollow">ssl.html</a>) say I need to provide a private key. I only have the certificate file (base64 PEM format). My devops says that a private key is not required in this case because I do not need to identify the local side of the connection.</p>
  
  <h2>Question</h2>
  
  <p>Is there a way to send the email without providing the private key? If a private key is required, why?</p>