You may vote absentee if you are registered and will be unable to vote at the polls on election day because of:
Applying for an absentee ballot
You must apply for an absentee ballot from your city or town clerk no later than noon of the day before the election. Applications may be mailed or hand delivered and you may use any form of written communication (letter or postcard), or the official application form.
If you are applying for an absentee ballot for a primary and are a registered independent or unregistered, indicate which party's ballot you desire.
To be counted, a completed ballot must be received by the time the polls close on election day.
Applying to vote if you are absent from the state, in the armed services, or a prisoner
Registered and unregistered residents of Massachusetts outside the state and residents on active duty in the armed forces and merchant marine and their spouses or dependents, and prisoners, may vote absentee. They may request an absentee ballot from the city or town where they legally reside (if outside the U.S.), where they resided last before leaving). In addition a close relative may apply on their behalf in person at their clerk's or election commission's office.
If you are applying for an absentee ballot for a primary and are a registered independent or unregistered, indicate which party's ballot your desire.
A family member of a registered voter who is a student at a college or university may apply for an absentee ballot on the student's behalf, to the clerk or election commission of the city or town where the student is registered.
In all cases, unregistered voters must register when they return to the state, since this does not establish permanent registration.
(Information courtesy of the Holyoke City website) More Voter info here