In the event that you have to fail a contract (you got ganked) always inform a Senior pusher or the CEO. Also, so customers are not left confused, send the customer a friendly letter explaining that you lost the contract. Most customers understand that these things happen on occasion. NEVER link the killmail though as we do not reveal our haulers. It is best to not reveal details about how the loss of a contract occurred for security and safety reasons.
Use the Failed Contract mail in PIR under the Mail Templates for the contract to send the mail.