I am writing a program that simulates water storage with combined rain and pump fed supply. To allow a hypothetic employee in control to overview the situation while inspecting some remote locations of the park an email needs to be sent every five minutes with latest figures and a chart.
I use the following code to achieve the results close to described above. The "chart" and "legend" are both bitmaps, please replace them with "test","test" if you want to test it.
And now the issue that left me speechless and desperate at the same time: The email is sent. It is perfectly composed and with nicely rendered and not distorted bitmaps. However it is sent up to three times a second!
I've rewritten the code several times from scratch replacing SendMail with something else and returning SendMail back into the module. It appears that SendMail causes the Refresh function to fire continuously ignoring completely the UpdateInterval and TrackedSymbols options altogether.
I have an uncertain feeling that I did something wrong and the code is incomplete to do what I want. What could it be?
Dynamic[
Refresh[
SendMail["To" -> "xyz@gmail.com",
"Subject" -> "Pump Storage BX, Inflow Progress", "Body" -> {chart, legend},
"From" -> "xyz@gmail.com", "Server" -> "smtp.gmail.com",
"UserName" -> "xyz@gmail.com",
"Password" -> "hunter2", "PortNumber" -> 587,
"EncryptionProtocol" -> "StartTLS"]
, UpdateInterval -> 300, TrackedSymbols -> {}
]
]
Rulein the option. – rm -rf♦ Mar 16 at 15:20->(which isRule). This means that Mathematica does not know about which symbols should be tracked (in essence, the typo is as good as not specifying it) – rm -rf♦ Mar 16 at 16:18