if choose=="Dr.Xyz":
print()
dbt=input("What doubt do you have for Dr.Xyz?: ")
content="Dear Tutor, following is the asked doubt along with the name, email of the
student: ",dbt, "\t Name and email is: ",email,"\t Please provide the solution as soon
as possible. Thank you"
mail=smtplib.SMTP('smtp.gmail.com',587)
mail.ehlo()
mail.starttls()
mail.login('ipprojectsender1@gmail.com','Password1029')
mail.sendmail('ipprojectsender1@gmail.com','ipprojectreciever@gmail.com',content)
mail.close()
print()
print("Mail sent to teacher! Won't be long until they reply! Thanks for using
TeacherFinder!")
#Here is what i'm gettng as the error
Traceback (most recent call last):
File "C:\Users\91705\Desktop\TeacherFinder.py", line 81, in <module>
mail.sendmail('ipprojectsender1@gmail.com','ipprojectreciever@gmail.com',content)
File "C:\Users\91705\AppData\Local\Programs\Python\Python38-32\lib\smtplib.py", line 886, in sendmail
(code, resp) = self.data(msg)
File "C:\Users\91705\AppData\Local\Programs\Python\Python38-32\lib\smtplib.py", line 568, in data
q = _quote_periods(msg)
File "C:\Users\91705\AppData\Local\Programs\Python\Python38-32\lib\smtplib.py", line 176, in _quote_periods
return re.sub(br'(?m)^\.', b'..', bindata)
File "C:\Users\91705\AppData\Local\Programs\Python\Python38-32\lib\re.py", line 210, in sub
return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object