Using Email Template

I am a newbie to the CRM. I would like to automatically add the Opportunity name to an email template. I have selected the $opportunity_name variable and inserted. Next I go to the Opportunity, select Create Task -> Email and then select the template. But the Opportunity name does not get inserted when the email is sent. What am I doing wrong. Please help.

Is the field blank, or is it just the variable that is shown?

Sorry for the very late reply. The variable is shown. Field is not blank. For e.g., $opportunity_name is what appears in the field.

Thank you