Letter of Credit gives comfort to the exporter that in case the importer is not able to pay, the importer's bank will pay on importer's behalf. LC is issued by importer's bank and reaches exporter's bank. There are underlying goods which importer is importing.
Now if the importer doesn't have money to pay for imports especially in foreign currency, it would need a foreign currency loan. For this financing, it can approach it's local bank to issue a letter of undertaking or letter of comfort. This letter will give comfort to a foreign bank branch about importer's credit history to issue a forex loan to the importer. Letter of comfort works when branches of same bank in different countries are involved. LOU works when branches of different banks in different countries are involved. The lending bank trusts the assessment done by issuing bank as the lending bank doesn't typically have access to history of the importer. LOU works as a guarantee that in case importer defaults on this forex loan, the LOU issuing bank stands by.
Purpose of LOU is financing, whereas purpose of LC provides temporary comfort against risk dealing with another party while importing goods.