During my English course I was told that the present perfect tense and the present perfect continuous tense can be used interchangeably in many situations, and it appears to be one of them. However, there is a subtle difference: #1 focuses more on the very activity of working, whereas #2 concentrates on the state (i.e. a job). Therefore, it would probably be more justified to use #1 when talking about a person who carries the same task on and on, endlessly (the Danaides? Sisyphus?); and #2 is somewhat closer to "I have been employed here for 20 years." Still, I am not a native speaker of English ang my arguments may prove wrong.
... you can't present perfect (or continuous) and past simple within a sentence.
As it stands, this rule is incorrect. In many cases it is acceptable and logical to mix past and present references in consecutive clauses
I lost my keys last week, but now I have found them.
This makes sense: A was true then, but B is true now.
This, however, does not make sense:
He has decided to go hiking, so I went hiking as well.
This sentence amounts to A was true then, because B is true now. The simple past describes a past event, your going hiking, but what the present perfect describes is not a past event, his decision, but a present state which is the result of a past event--his state of having decided. That present state cannot be the cause of the past event. The cause must be either a past event or a past state:
He decided (event) to go hiking, so I went hiking as well or
He had decided (state) to go hiking, so I went hiking as well.
The important thing is not to mix time references illogically.
As for the sentence in your friend's email:
Getting that email was such a pleasant surprise, because I was just thinking how I've been wanting to send you an email
There is no mixture of time references here, because the progressive construction "I have been wanting" marks a state, not an event, which may very reasonably be taken to continue into the present out of a past which is marked (by "just") as immediate. In effect, these pasts inhabit the same time frame as the present.
In any case, the "rules" are very loosely applied in informal discourse; see my discussion here. A casual email, which your friend probably dashed off in excitement, should not be held to the formal literary standards of coherence.
Best Answer
They're practically the same, I'd use
working
to stress that you're presently actively doing it:But this is a personal preference, and nobody can fault you for just following your ear here.