I want Mathematica to send me an email when the computation is finished. To that end, I have a cell with SendMail[...] which I place behind my computation in the evaluation queue. The problem I have is that I need to enter a password for my mail server. Doing that as an explicit rule leaves the password unencrypted and visible to everyone. On the other hand, setting "Password"->Automatic will only show a dialog box once the SendMail cell is evaluated. Is there a way to show the dialog box for password entry beforehand, such that I can enter the password and walk away?
Here is one solution based on encoded package.
To create a pack you have to create a .m file (in this case mailPack.m). There is one example using gmail configuration:
Now you can open another notebook, save in the same directory, and the do this to encode the first:
Now, if you try to open your mailPack.m as txt file, you will see that it is completely unreadable.
To use your