import os

from sendgrid import sendgrid, Email
from sendgrid.helpers.mail import Content, Mail, MailSettings, SandBoxMode


def send_email(subject, content):
    sg = sendgrid.SendGridAPIClient(apikey=os.environ.get('SENDGRID_API_KEY'))
    from_email = Email(name='TV sort', email='tvsortsl@gmail.com')
    to_email = Email(name='TV sort', email='tvsortsl@gmail.com')
    content = Content("text/plain", content)
    mail = Mail(from_email, subject, to_email, content)
    sand_box = os.environ.get('SAND_BOX')

    print(os.environ.get('SENDGRID_API_KEY'))
    print(os.environ.get('SAND_BOX'))

    if sand_box == 'true':
        mail_settings = MailSettings()
        mail_settings.sandbox_mode = SandBoxMode(True)
        mail.mail_settings = mail_settings

    return sg.client.mail.send.post(request_body=mail.get())

@@ -202,33 +202,33 @@
 =os.environ.get(
-'
+%22
 SENDGRID_API_KEY
@@ -223,25 +223,25 @@
 GRID_API_KEY
-'
+%22
 ))%0A    from_
@@ -259,33 +259,33 @@
 il(name=
-'
+%22
 TV sort
-'
+%22
 , email=
 'tvsorts
@@ -268,33 +268,33 @@
 TV sort%22, email=
-'
+%22
 tvsortsl@gmail.c
@@ -291,25 +291,25 @@
 sl@gmail.com
-'
+%22
 )%0A    to_ema
@@ -328,25 +328,25 @@
 ame=
-'
+%22
 TV sort
-'
+%22
 , email=
 'tvs
@@ -341,17 +341,17 @@
 , email=
-'
+%22
 tvsortsl
@@ -360,17 +360,17 @@
 mail.com
-'
+%22
 )%0A    co
@@ -494,25 +494,25 @@
 ron.get(
-'
+%22
 SAND_BOX
 ')%0A%0A    
@@ -507,94 +507,9 @@
 _BOX
-')%0A%0A    print(os.environ.get('SENDGRID_API_KEY'))%0A    print(os.environ.get('SAND_BOX')
+%22
 )%0A%0A 
@@ -530,14 +530,14 @@
  == 
-'
+%22
 true
-'
+%22
 :%0A  

Clean messages.py