In the summer of 1844 one of Thackeray's friends, James Emerson Tennent, who was about to set off on a voyage to the East, invited Thackeray to join his party; and; to make the invitation more attractive, promised to secure a free berth for him from the Directors of the P. & O. Company. Three days later Thackeray was on board ship. In 1864 he published Notes of a journey from Cornhill to Grand Cairo. This book was not written as a puff for the P. & O., but the atrabiliar [affected with bile] Carlyle assumed that it was, and said so. His remarks reached Thackeray in due course, and the two men were never on really cordial terms again. Some time later Charles Cavan Duffy asked Carlyle about Thackeray, and Carlyle gave his version of what had gone wrong.
Note from Thackeray, from Literary Anecdotes