Operating system?
Keyboard brand/model?
What does the keyboard type on it's own. Do you recognize what it types on it's own?
Does problem occur only while composing email? What email client?
Tried the keyboard on a different computer? If it acts up on a different computer you might consider replacing the keyboard as most of them are dirt cheap nowadays.