A good behavior must have both good motivation and good effect
If it is intentional or unintentional to hurt others, but the possibility of such harm is predictable, in both cases, the act of causing harm to others is an evil act
Mr. P wrote a letter trying to provoke the relationship between Mr. E and his girlfriend. P's behavior is evil, although this letter has the opposite effect to his motivation.