Past perfect would be needed in that first sentence, since you are describing an event in the past that doesn't continue on to the present (the email has been sent and cannot be un-sent if it's typical email).
So your choices are:
In my last email I had almost forgotten to tell you that, so I'm going to tell you now.
versus
In my last email I almost forgot to tell you that, so I'm going to tell you now.
Another minor issue, because if you did not tell him/her that in the email, you didn't almost forget, you did forget.
In my last email I had forgotten to tell you that, so I'm going to tell you now.
In my last email I forgot to tell you that, so I'm going to tell you now.
Past perfect is meant to describe an event that is occuring among more than one event in the past. Here, you only describe a single event (forgetting to tell in the email - note that sending the email and forgetting are not separate events because you forgot while sending the email), unless there's another past event in established context or sentences to relate it to, you should use the simple past.
Read this. Past perfect can also be used if you specify a time with a past event, but you aren't doing that either. E.g.:
In my last email I had sent at 3pm yesterday I forgot to tell you that, so I'll tell you now.
In general, the choice of grammatical aspect is, unlike tense, not strictly delineated. You can often choose between two or more aspects to express the same basic idea, because aspects have less to do with denotation, and more to do with connotation. In other words, aspects carry implications and tonality, but they have less effect on the literal meaning of the sentence. As a result, the "correct" aspect is often a matter of opinion and interpretation.
So, let's go through these examples:
John hasn't studied very well this term.
This is present perfect simple, as your book says. It carries the connotation that John's poor study habits are either already causing problems for him, or are likely to cause problems in the near future. For example, you might continue the sentence like this:
John hasn't studied very well this term, so now he's at risk of failing the exam.
The emphasis is on the consequences of the action, even if those consequences are not explicitly stated.
Now, let's look at your other example:
John hasn't been studying very well this term.
This is present perfect continuous. Since it's still a perfect aspect, it still conveys the same emphasis on consequences. However, it also suggests that there is still time for John to change his study habits. It sometimes shows up in cases where the action is interrupted or altered, as in this continuation:
John hasn't been studying very well this term, so the teacher gave him an extra assignment.
We could also have something like this:
John hasn't been studying very well this term, but he could still catch up.
These continuations are (for the most part) also possible with the simple perfect, but they make more logical sense in the context of the continuous perfect.
Having said all that, you generally cannot use the present perfect continuous in cases where the action is far in the past, or otherwise "complete." Similarly, the simple perfect is usually considered less appropriate for a continuous action which is still ongoing (although, as in our examples above, it can sometimes be used with habitual or repeated actions, especially when those actions are unlikely to continue).
Best Answer
Maybe, "It has been a very long time since I have read a good book". Here, the emphasis is on the time.
This reminds me of the sentence "I didn't say you stole my money". Here, emphasis can be stressed on every word in the statement to provide a different meaning.