Where any person claiming to be the patentee of an invention, by circulars, advertisements, or otherwise, threatens any other person with any legal proceedings or liability in respect of any alleged infringement of the patent, any person aggrieved thereby may bring an action against him, and may obtain an injunction against the continuance of such threats, and may recover such damage (if any) as he has sustained thereby, if the alleged infringement to which the threats related was not in fact an infringement of any legal rights of the person making such threats:
Provided that this section shall not apply if the person making such threats with due diligence commences and prosecutes an action for infringement of his patent.