I have written a script that writes a message to a text file and also sends it as an email. Everything goes well, except the email finally appears to be all in one line. >
Unfortunately for us all, not every type of program or application uses the same standardization that python does.
Looking at your question i notice your header is: "Content-Type: text/html"
Which means you need to use HTML style tags for your new-lines, these are called line-breaks.
Your text should be:
"Dear Student,
Please send your report
Thank you for your attention"
If you would rather use character type new-lines, you must change the header to read: "Content-Type: text/plain"
You would still have to change the new-line character from a single \n to the double \r\n which is used in email.
Your text would be:
"Dear Student, \r\n Please send your report\r\n Thank you for your attention"