In an action for libel or slander, the defendant, in his answer, may allege both the truth of the matter charged as defamatory and any mitigating circumstances to reduce the amount of damages; and, whether he proves the justification or not, he may give in evidence the mitigating circumstances.