They are almost, but not quite, interchangeable. The difference is very subtle.
To "have the chance to" implies something very definite, and quite possibly a one-time opportunity to do something.
To "have a chance to" implies something which might occur again in the future.
"I have the chance to go to Australia." (and all expenses will be paid for me)
This suggests that while the opportunity to go to Australia might arise again, the chance to go without it costing me anything is not likely to happen again.
"I have a chance to go to Australia." (but I might have another chance in two years)
This suggests that I have an opportunity now, but that I might have an opportunity again in the future.
More commonly, one sees it used in the past tense.
"I had the chance to do it." (but did not take it)
"I had a chance to do it." (and perhaps I will again)
To use your specific example:
had the chance to send one message (You had the chance, but you did not use it.)
had a chance to send one message (You had a chance, and you might have a chance again.)
Your use of "If" adds an element of condition which is contrary to fact. This complicates it, because what you are really saying is:
"If you had the chance to send one message . . .." (but, you don't have that chance)
"If you had a chance to send one message . . .." (you don't have the opportunity right now, but you might in the future)
The subtle difference in this usage will come with experience in using English. Replacing "chance" with "opportunity" might make it a bit easier to distinguish the difference between the two.
- For Teachers