late 15c., "by heart" (Caxton), from cordial + -ly (2). Meaning "heartily, earnestly" is from 1530s; weakened sense of "with friendliness" is attested by 1781.
Entries linking to cordially
cordial adj.
c. 1400, "of or pertaining to the heart" (a sense now obsolete or rare, replaced by cardiac), from Medieval Latin cordialis "of or for the heart," from Latin cor (genitive cordis) "heart," from PIE root *kerd- "heart." Meaning "heartfelt, proceeding from the heart as the supposed seat of kindly feelings" is from mid-15c. Related: Cordiality.
The noun meaning "something that invigorates" is from late 14c., originally "medicine, food, or drink that stimulates the heart." Meaning "sweet or aromatic liquor" is from 1610s.
-ly 2
common adverbial suffix, forming from adjectives adverbs signifying "in a manner denoted by" the adjective, Middle English, from Old English -lice, from Proto-Germanic *-liko- (cognates: Old Frisian -like, Old Saxon -liko, Dutch -lijk, Old High German -licho, German -lich, Old Norse -liga, Gothic -leiko); see -ly (1). Cognate with lich, and identical with like (adj.).
Weekley notes as "curious" that Germanic uses a word essentially meaning "body" for the adverbial formation, while Romanic uses one meaning "mind" (as in French constamment from Latin constanti mente). The modern English form emerged in late Middle English, probably from influence of Old Norse -liga.