title: Why does smtplib not work with all email services?
body: <pre><code>import smtplib 
  EMAIL = 'email@email.com'
  PASS_EMAIL = '**********'
  email = &quot;another@email.com&quot;
  smtpObj = smtplib.SMTP('smtp.gmail.com', 587)
  smtpObj.starttls()
  smtpObj.login(EMAIL, PASS_EMAIL)
  smtpObj.sendmail(EMAIL, email, &quot;Hello, a message for testing!&quot;)
  smtpObj.quit()
  </code></pre>
  <p>This code works with gmail perfectly. However, it doesn't always work with yandex (sometimes I don't receive the email) and it doesn't work with mail.ru and rambler.ru at all. How can I fix it?</p>
  <h1>dig output:</h1>
  <pre><code>; &lt;&lt;&gt;&gt; DiG 9.16.8-Debian &lt;&lt;&gt;&gt; gmail.com txt
  ;; global options: +cmd
  ;; Got answer:
  ;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 45942
  ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 4, ADDITIONAL: 9
  
  ;; OPT PSEUDOSECTION:
  ; EDNS: version: 0, flags:; udp: 4096
  ;; QUESTION SECTION:
  ;gmail.com.         IN  TXT
  
  ;; ANSWER SECTION:
  gmail.com.      114 IN  TXT &quot;globalsign-smime-dv=CDYX+XFHUw2wml6/Gb8+59BsH31KzUr6c1l2BPvqKX8=&quot;
  gmail.com.      114 IN  TXT &quot;v=spf1 redirect=_spf.google.com&quot;
  
  ;; AUTHORITY SECTION:
  gmail.com.      138453  IN  NS  ns4.google.com.
  gmail.com.      138453  IN  NS  ns1.google.com.
  gmail.com.      138453  IN  NS  ns3.google.com.
  gmail.com.      138453  IN  NS  ns2.google.com.
  
  ;; ADDITIONAL SECTION:
  ns2.google.com.     311240  IN  A   216.239.34.10
  ns2.google.com.     311240  IN  AAAA    2001:4860:4802:34::a
  ns1.google.com.     311240  IN  A   216.239.32.10
  ns1.google.com.     311240  IN  AAAA    2001:4860:4802:32::a
  ns3.google.com.     311248  IN  A   216.239.36.10
  ns3.google.com.     311248  IN  AAAA    2001:4860:4802:36::a
  ns4.google.com.     311248  IN  A   216.239.38.10
  ns4.google.com.     311248  IN  AAAA    2001:4860:4802:38::a
  
  ;; Query time: 12 msec
  ;; SERVER: 192.168.1.1#53(192.168.1.1)
  ;; WHEN: Ср янв 27 21:52:15 +05 2021
  ;; MSG SIZE  rcvd: 414
  </code></pre>