title: How to send a plain text mail using AWS SES to gmail
body: <p>I have a formatted file, with padding strings, when I send it to my account in gmail, all the paddings in the file are deleted and the mail is not well formatted because gmail does not keep the original format. 
  What to do to avoid this ? </p>
  
  <p>I tried this code, but it is not working using Raw email : </p>
  
  <pre><code>from email.mime.multipart import MIMEMultipart
  from email.mime.text import MIMEText
  import smtplib
  from email import encoders
  
  fileHandler = "logg.log"
  session = Session(profile_name="test", region_name="eu-west-1")
  ses = session.client('ses')
  today = datetime.date.today() - datetime.timedelta(days=1)
  for file in sorted(glob.glob(fileHandler + '*'), key=os.path.getmtime):
      body = MIMEText(open(file, 'r').read())
      body['Subject']="aws-log"
      response = ses.send_raw_email(
                              Source = "smymail@.com",
                              Destinations=[
                                      "smymail@fluksaqua.com",
                                  ],
                              RawMessage={
                                  'Data': body.as_string()
                                      },)
  </code></pre>
  
  <p>Even by using raw mails, the mail does not come in plain text.</p>
  
  <p>Here is the file I send to gmail :</p>
  
  <p><a href="https://i.stack.imgur.com/qpC31.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qpC31.png" alt="enter image description here"></a></p>
  
  <p>This is the mail I get:</p>
  
  <p><a href="https://i.stack.imgur.com/97pIA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/97pIA.png" alt="enter image description here"></a></p>