If, however, the false signification be about something the knowledge of which affects a man's good, for instance if it pertain to the perfection of science or to moral conduct, a lie of this description inflicts an injury on one's neighbor, since it causes him to have a false opinion, wherefore it is contrary to charity, as regards the love of our neighbor, and consequently is a mortal sin. On the other hand, if the false opinion engendered by the lie be about some matter the knowledge of which is of no consequence, then the lie in question does no harm to one's neighbor; for instance, if a person be deceived as to some contingent particulars that do not concern him. Wherefore a lie of this kind, considered in itself, is not a mortal sin. As regards the end in view, a lie may be contrary to charity, through being told with the purpose of injuring God, and this is always a mortal sin, for it is opposed to religion; or in order to injure one's neighbor, in his person, his possessions or his good name, and this also is a mortal sin, since it is a mortal sin to injure one's neighbor, and one sins mortally if one has merely the intention of committing a mortal sin.
Thomas Aquinas, Aquinas, Summa Theologica II-II.Q110.A4