So, I've experimented...
If I comment out line 218 the import appears to work OK!
The From line is not rewritten. But is it necessary for it to be rewritten? I stopped the import after two messages. These both show the original author email and name in From, and also prepended at top of body of message. I'm assuming no emails were sent because they should have been blocked by the hashtag #mi
What is the benefit of rewriting the From line, and if it is important to do that how do I fix the erroring on line 218?