title: how to send email with python directly from server and without smtp
body: <p>I'm php programmer and with php you can send email with server directly, for example this code send email to client:</p>
  
  <pre><code>&lt;?php
  $to      = 'nobody@example.com';
  $subject = 'the subject';
  $message = 'hello';
  $headers = 'From: webmaster@example.com' . "\r\n" .
      'Reply-To: webmaster@example.com' . "\r\n" .
      'X-Mailer: PHP/' . phpversion();
  
  mail($to, $subject, $message, $headers);
  ?&gt; 
  </code></pre>
  
  <p>but in python you have to use smtplib and gmail or hotmail servers for sending email.
  I wonder is there anyway to send email with python direct from server? </p>