title: Send mail and save message in file using Python
body: <p>I want to send email using Python and simultaneously want to write mail-message in a file as well.For sending mail I can do easily with smtplib but for saving part need your help.</p>
  
  <p>My need is I am creating a webtool for my company where need to send a mail and have to send an update in every an hour so I have planned to save message into file and at the time of second send will call that file and will send with new update. If anyone knows other method then most welcome.</p>
  
  <p>send code:</p>
  
  <pre><code> import smtplib
   server = smtplib.SMTP('smtp.gmail.com', 587)
   server.ehlo()
   server.starttls()
   server.login("sender@gmail.com", "passwd")
   msg = "Hello World!"
   server.sendmail("sender@gmail.com", "receiver@gmailcom", msg)
   server.quit()
  </code></pre>
  
  <p>Thanks in advance</p>