Here are a couple things to check.
1) It sounds like the email is sent when the task is assigned. If so, make sure
that the person being assigned is in the SharePoint People and Groups list for
the the site. Also, make sure that they have an email address in their
SharePoint user record.
2) If doing this in Visual Studio you can't just edit the From, To, Body or
Subject fields of the message. They must be bound to fields or the email won't
work. If they are bound to fields you can then edit either the fields or the
to, Body and Subject. From can't be changed or the email won't be sent.