when you set setSaveAsActivity to true, salesforce tracks the Html email(to know if html email is opened and how many time opened etc). when you set this you also need to set mail.setTargetObjectId(contact.id);//The ID of the contact, lead, or user to which the email will be sent.
mail.setTargetObjectId(contact.id);//The ID of the contact, lead, or user to which the email will be sent.
https://help.salesforce.com/apex/HTViewSolution?id=000006731&language=en_US