Avatar ·

Sending email. The letter is not sent with Cyrillic

📁 Advanced Python Topics, Error, python3, work

Purpose: you need to send a letter to the mail. The letter has Cyrillic symbols.

The problem: the script works with Latin symbols, but does not work with the Cyrillic alphabet

script:

   import  smtplibtext =  \\   to =  'xxxxxx@gmail.com'  subject =  'xxxx'   # gmail sign in  gmail_sender =  'xxxx@gmail.com'  gmail_passwd =  'xxxxxx'  server = smtplib.SMTP ( 'smtp.gmail.com' ,  587 ) server.ehlo () server.starttls () server.logi