I am trying to automate some procedures for grading and returning student work. It's all online so it's a lot of file management. The specific question is this. Suppose I have an open notebook with comments for the student. Just a few simple text lines, which questions they got wrong, etc.
I can use SendMail
to email the student, but how do I copy the contents of that notebook and use them as the BODY of the email?
Selecting the contents of the notebook and reading it gives all the cell expressions.
SelectionMove[temp, All, Notebook]
body = NotebookRead[temp]
This doesn't work for the body of the email.
Is there a way to copy the contents of a notebook in a format that would be suitable for the "Body" part of a SendMail
command?
I should add that all the other procedures are automated, creating the file, sending comments to the file, who the student is, what their email is, so at the end, after grading their work, everything is in place to send off the email using Mathematica, but I don't know how to get my comments into the body of that email.
NotebookImport
? $\endgroup$