In a letter dated 14th April, Ferguson explained that he had learned of the matter recently. The 61-year-old Hejazi was diagnosed as having lung cancer a few months ago.
"I was sorry to hear that you have not been feeling too well. I just thought I would drop you a line on behalf of the players and staff, as I wanted you to know that we are all thinking about you," the United boss wrote.
Hejazi is among the most recognized players in Iran. In 2000, he was ranked by the Asian Football Confederation as the 20th Century's second best Asian goalkeeper.
In 1978, Hejazi was approached by Manchester United and trained with them for a month and appeared in the reserves.
"On a personal note, I would like to thank you for your loyal support and devotion to the club over the years, which is very much appreciated," Ferguson added.
"I know that the last few months have been difficult for you but trust that you will gain some comfort knowing that you are in our thoughts and prayers," he concluded.